<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Roslyn on Strathweb. A free flowing tech monologue.</title>
    <link>https://www.strathweb.com/categories/roslyn/</link>
    <description>Recent content in Roslyn on Strathweb. A free flowing tech monologue.</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <lastBuildDate>Mon, 31 Jan 2022 18:31:34 +0000</lastBuildDate><atom:link href="https://www.strathweb.com/categories/roslyn/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Hello OmniSharp on .NET 6.0!</title>
      <link>https://www.strathweb.com/2022/01/hello-omnisharp-on-net-6-0/</link>
      <pubDate>Mon, 31 Jan 2022 18:31:34 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2022/01/hello-omnisharp-on-net-6-0/</guid>
      <description>&lt;p&gt;On December 15, 2021 we &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn/blob/master/CHANGELOG.md#1380&#34;&gt;released&lt;/a&gt; version 1.38.0 of OmniSharp which, for the first time, included .NET 6.0 builds of the OmniSharp server. The related feature branch was maintained for over a year, and previously contained a .NET 5-based variant of OmniSharp, though that one was never released.&lt;/p&gt;
&lt;p&gt;This is a big milestone in the OmniSharp project as the .NET 6.0 build is much faster and a lot more stable, and is the first step towards retiring the .NET Framework/Mono builds of OmniSharp.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>C# semantic classification with Roslyn</title>
      <link>https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/</link>
      <pubDate>Mon, 15 Jun 2020 16:21:40 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/06/c-semantic-classification-with-roslyn/</guid>
      <description>&lt;p&gt;A while ago, I blogged about &lt;a href=&#34;https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/&#34;&gt;using Roslyn&amp;rsquo;s completion service&lt;/a&gt;. In today&amp;rsquo;s post, I wanted to continue looking at some of the excellent compiler features that can be utilized to build IDE-like features in your projects. This time, we will look at how to do semantic classification of the code using Roslyn.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hidden features of OmniSharp and C# extension for VS Code</title>
      <link>https://www.strathweb.com/2020/02/hidden-features-of-omnisharp-and-c-extension-for-vs-code/</link>
      <pubDate>Thu, 13 Feb 2020 19:41:07 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/02/hidden-features-of-omnisharp-and-c-extension-for-vs-code/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt; powers intellisense and language services in C# plugins and extensions for numerous editors, including &lt;a href=&#34;https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp&#34;&gt;VS Code&lt;/a&gt;. When we build things into OmniSharp, we typically try to keep things lightweight (of course if the term &amp;ldquo;lightweight&amp;rdquo; applies to anything related to MSBuild…) and non-invasive. This means that many features/tweaks are actually opt-in by default, and wouldn&amp;rsquo;t normally show up on their own.&lt;/p&gt;
&lt;p&gt;In this post I wanted to show you a few of such less known features.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Enforcing C# EditorConfig formatting conventions at build time</title>
      <link>https://www.strathweb.com/2020/01/enforcing-c-editorconfig-formatting-conventions-at-build-time/</link>
      <pubDate>Sun, 26 Jan 2020 07:40:29 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2020/01/enforcing-c-editorconfig-formatting-conventions-at-build-time/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2019&#34;&gt;EditorConfig&lt;/a&gt; is an excellent way to enforce stylistic rules on your C# projects. However, the rules and their corresponding IDExxxx diagnostics are only enforced in the editor, such as Visual Studio or VS Code with OmniSharp, but not at build time.&lt;/p&gt;
&lt;p&gt;While there are &lt;a href=&#34;https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference?view=vs-2019#convention-categories&#34;&gt;various&lt;/a&gt; categories of EditorConfig conventions that you can use, in this post, I will show you how to enforce the formatting conventions (IDE0055) at build time.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building a C# Interactive shell in a browser with Blazor (WebAssembly) and Roslyn</title>
      <link>https://www.strathweb.com/2019/06/building-a-c-interactive-shell-in-a-browser-with-blazor-webassembly-and-roslyn/</link>
      <pubDate>Fri, 07 Jun 2019 14:52:38 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/06/building-a-c-interactive-shell-in-a-browser-with-blazor-webassembly-and-roslyn/</guid>
      <description>&lt;p&gt;In this post I wanted to show you how to write and embed a C# interactive shell (a REPL - read-evaluate-print-loop) in a browser, on top of WebAssembly.&lt;/p&gt;
&lt;p&gt;The REPL will give you fully fledged C# interactive development playground, while still being completely sandboxed in the browser environment. I originally wrote this example for my session at Dotnet Cologne on May 10 this year.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Roslyn analyzers and code fixes in OmniSharp and VS Code</title>
      <link>https://www.strathweb.com/2019/04/roslyn-analyzers-in-code-fixes-in-omnisharp-and-vs-code/</link>
      <pubDate>Tue, 30 Apr 2019 20:10:17 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/04/roslyn-analyzers-in-code-fixes-in-omnisharp-and-vs-code/</guid>
      <description>&lt;p&gt;Recently we merged a big (albeit still experimental) feature into OmniSharp - the support for Roslyn analyzers.&lt;/p&gt;
&lt;p&gt;I wanted to take a few moments today to discuss this feature with you, share some background info, show you how to get it enabled and share some plans for the next steps.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Collectible assemblies in .NET Core 3.0</title>
      <link>https://www.strathweb.com/2019/01/collectible-assemblies-in-net-core-3-0/</link>
      <pubDate>Wed, 09 Jan 2019 22:16:39 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2019/01/collectible-assemblies-in-net-core-3-0/</guid>
      <description>&lt;p&gt;Since the beginning of .NET Core, the one feature that I have been most anxiously waiting for, has been support for collectible assemblies. It took a while (a while!), but finally, in .NET Core 3.0 (at the time of writing &lt;em&gt;3.0.0-preview-27122-01&lt;/em&gt; from 2018-12-04), it&amp;rsquo;s here.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s going to be a killer functionality, that will support some excellent use cases in .NET Core - especially around application plugins, extensibility and dynamic assembly generation.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a quick look at how we can load and unload assemblies in .NET Core.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Using Roslyn C# Completion Service programmatically</title>
      <link>https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/</link>
      <pubDate>Wed, 05 Dec 2018 20:23:48 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/12/using-roslyn-c-completion-service-programmatically/</guid>
      <description>&lt;p&gt;I am involved in a few open source projects built around the &lt;a href=&#34;https://github.com/dotnet/roslyn&#34;&gt;Roslyn&lt;/a&gt; compiler. One of those projects is &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;OmniSharp&lt;/a&gt;, which brings intellisense and C# language services to a number of editors out there, allowing them to provide for their users a rich C# code authoring experience.&lt;/p&gt;
&lt;p&gt;Which actually brings me to the point of today&amp;rsquo;s post. Roslyn is a compiler-as-a-service that you can embed in your own app, and when you do that, you could reach into its C# language services (more specifically, &lt;em&gt;CompletionService&lt;/em&gt;) and easily build your own C# intellisense engine.&lt;/p&gt;
&lt;p&gt;However, this is not really documented, so I wanted to use this post to show you how you can get started with that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 0.27.0 is out – with a ton of features!</title>
      <link>https://www.strathweb.com/2018/11/dotnet-script-0-27-0-is-out-with-a-ton-of-features/</link>
      <pubDate>Thu, 08 Nov 2018 20:59:15 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/11/dotnet-script-0-27-0-is-out-with-a-ton-of-features/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s that time again, the new &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; release, version 0.27.0 is out. It&amp;rsquo;s been 2+ months since the last release so this one is fully packed with great features.&lt;/p&gt;
&lt;p&gt;You can get it by running &lt;em&gt;dotnet tool install dotnet-script -g&lt;/em&gt; (if you don&amp;rsquo;t have it installed yet) or &lt;em&gt;dotnet tool update dotnet-script -g&lt;/em&gt; (if you just need an update).&lt;/p&gt;
&lt;p&gt;Let me quickly walk you through some of them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>No InternalsVisibleTo, no problem – bypassing C# visibility rules with Roslyn</title>
      <link>https://www.strathweb.com/2018/10/no-internalvisibleto-no-problem-bypassing-c-visibility-rules-with-roslyn/</link>
      <pubDate>Mon, 08 Oct 2018 19:26:35 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/10/no-internalvisibleto-no-problem-bypassing-c-visibility-rules-with-roslyn/</guid>
      <description>&lt;p&gt;Both the C# compiler and the CLR/CoreCLR runtimes contain a bunch of rules that are in place to save us from ourselves (and to allow us to write code without needing to fully understand ECMA-334 C# Language Specification). That said, there are times where we want to do some things that are normally not allowed, and a good example of that is reaching into reflection to execute some private or internal code.&lt;/p&gt;
&lt;p&gt;Today I wanted to show you how to do something quite cool - how to bypass the type/member visibility rules using the Roslyn compiler. In other words, how to get access to internal and private members without needing to use reflection or something like &lt;em&gt;InternalsVisibleToAttribute&lt;/em&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 0.26 is out – with a boatload of new features</title>
      <link>https://www.strathweb.com/2018/08/dotnet-script-0-26-is-out-with-a-boatload-of-new-features/</link>
      <pubDate>Thu, 23 Aug 2018 09:30:09 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/08/dotnet-script-0-26-is-out-with-a-boatload-of-new-features/</guid>
      <description>&lt;p&gt;After a short holiday break, the &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; release train is back at full speed! This week we released &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases&#34;&gt;0.26&lt;/a&gt; which can be installed from NuGet - as the .NET CLI global tool - or from Chocolatey.&lt;/p&gt;
&lt;p&gt;Let me do a quick roundup of what&amp;rsquo;s new.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script now available as .NET Core SDK 2.1 global tool</title>
      <link>https://www.strathweb.com/2018/04/dotnet-script-now-available-as-net-core-sdk-2-1-global-tool/</link>
      <pubDate>Wed, 11 Apr 2018 08:14:09 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/04/dotnet-script-now-available-as-net-core-sdk-2-1-global-tool/</guid>
      <description>&lt;p&gt;Yesterday we released &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases/tag/0.20.0&#34;&gt;version 0.20.0&lt;/a&gt; of &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;dotnet-script&lt;/a&gt; - a command line tool that allows you to run C# scripts (.csx) in the .NET Core runtime.&lt;/p&gt;
&lt;p&gt;The highlight of this release is that it is now avaialble as .NET Core SDK 2.1 global tool, which provides an excellent acquisition/installation story directly from nuget.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Generic and dynamically generated controllers in ASP.NET Core MVC</title>
      <link>https://www.strathweb.com/2018/04/generic-and-dynamically-generated-controllers-in-asp-net-core-mvc/</link>
      <pubDate>Fri, 06 Apr 2018 13:42:56 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/04/generic-and-dynamically-generated-controllers-in-asp-net-core-mvc/</guid>
      <description>&lt;p&gt;One of those recurring themes that seem to come back fairly regularly among .NET web developers, is the usage of generic controllers to define endpoints in their Web APIs. I have witnessed these discussions as part of ASP.NET MVC, then ASP.NET Web API and most recently in ASP.NET Core MVC.&lt;/p&gt;
&lt;p&gt;While I don&amp;rsquo;t necessarily see a huge need or benefit for generic controllers, I can imagine that - especially in enterprise context - there are scenarios where exposing similarly structured, &amp;ldquo;cookie-cutter&amp;rdquo; CRUD endpoints quickly and seamlessly, could possibly have some business value.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at generic controllers then, and how we could also dynamically feed types into them.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Easy way to create a C# lambda expression from a string (with Roslyn)</title>
      <link>https://www.strathweb.com/2018/01/easy-way-to-create-a-c-lambda-expression-from-a-string-with-roslyn/</link>
      <pubDate>Mon, 29 Jan 2018 13:51:02 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2018/01/easy-way-to-create-a-c-lambda-expression-from-a-string-with-roslyn/</guid>
      <description>&lt;p&gt;I&amp;rsquo;ve worked on quite a lot of projects over the years, with many different teams, and one of the questions that keeps coming back to me over and over with a high degree of regularity is how to load a C# lambda from a string - for example from a configuration file.&lt;/p&gt;
&lt;p&gt;This is not surprising, because being able to do that can give you a tremendous amount of flexibility in your code, as it would (for the lack of better word) unlock the possibility to alter business logic from the configuration level, without having to recompile and redeploy your application.&lt;/p&gt;
&lt;p&gt;Historically, this has been possible but also quite a painful task. Today I wanted to show you a remarkably simple solution to this problem - with the help of the Roslyn compiler Nuget packages.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>dotnet-script 0.11 out – with inline Nuget support</title>
      <link>https://www.strathweb.com/2017/08/dotnet-script-0-11-out-with-inline-nuget-support/</link>
      <pubDate>Wed, 09 Aug 2017 11:12:44 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2017/08/dotnet-script-0-11-out-with-inline-nuget-support/</guid>
      <description>&lt;p&gt;Yesterday I released, thanks to the great help of &lt;a href=&#34;https://twitter.com/bernhardrichter&#34;&gt;Bernhard&lt;/a&gt; - version 0.11 of &lt;a href=&#34;https://github.com/filipw/dotnet-script/releases&#34;&gt;dotnet-script&lt;/a&gt;, the C# script runner for .NET Core.&lt;/p&gt;
&lt;p&gt;It is the biggest release yet - with the highlight feature being the ability to use inline Nuget packages.&lt;/p&gt;
&lt;p&gt;Here is the overview of what&amp;rsquo;s in there.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Introducing C# script runner for .NET Core and .NET CLI</title>
      <link>https://www.strathweb.com/2016/10/introducing-c-script-runner-for-net-core-and-net-cli/</link>
      <pubDate>Tue, 18 Oct 2016 15:48:54 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/10/introducing-c-script-runner-for-net-core-and-net-cli/</guid>
      <description>&lt;p&gt;In this post I wanted to share a little project I&amp;rsquo;ve been working on recently - a .NET CLI and .NET Core based script runner for C# (CSX scripts).&lt;/p&gt;
&lt;p&gt;The idea was super simple - I just wanted to be able to author C# scripts using .NET Core, leverage &lt;em&gt;project.json&lt;/em&gt; to define the script dependencies and execute scripts cross platfom using .NET CLI - via a &lt;em&gt;dotnet script&lt;/em&gt; command.&lt;/p&gt;
&lt;p&gt;The project is located &lt;a href=&#34;https://github.com/filipw/dotnet-script&#34;&gt;here on Github&lt;/a&gt;. You can head over and have a look at &lt;a href=&#34;https://github.com/filipw/dotnet-script/blob/master/README.md&#34;&gt;readme&lt;/a&gt; to get started - but, briefly, the key features are listed here.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building Analyzers &amp; Refactoring Tools with Roslyn (from NDC Sydney)</title>
      <link>https://www.strathweb.com/2016/09/building-analyzers-refactoring-tools-with-roslyn-from-ndc-sydney/</link>
      <pubDate>Tue, 06 Sep 2016 06:59:19 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/09/building-analyzers-refactoring-tools-with-roslyn-from-ndc-sydney/</guid>
      <description>Last month I was at the excellent NDC Sydney conference, where I did a talk about building code analyzers and refactoring tools with Roslyn. Below you can find the the video, code and slides from the session.
Thanks to everyone who attended - I had great fun, and I was even mugged by a kangaroo afterwards.
Video 🔗You can watch the talk on Vimeo. And if you are wondering, yes, my t-shirt says &amp;ldquo;#ENDREGIONS&amp;rdquo;.</description>
    </item>
    
    <item>
      <title>Implementing custom #load behavior in Roslyn scripting</title>
      <link>https://www.strathweb.com/2016/06/implementing-custom-load-behavior-in-roslyn-scripting/</link>
      <pubDate>Fri, 17 Jun 2016 08:10:01 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/06/implementing-custom-load-behavior-in-roslyn-scripting/</guid>
      <description>&lt;p&gt;&lt;em&gt;#load&lt;/em&gt; directives in C# scripts are intended to allow you to reference a C# script source file from another C# script. As an author of a host application, in which the Roslyn scripting would be embedded, it&amp;rsquo;s up to you to define how &lt;em&gt;#load&lt;/em&gt; should behave.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look at the process of doing that.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building strongly typed application configuration utility with Roslyn</title>
      <link>https://www.strathweb.com/2016/04/building-strongly-typed-application-configuration-utility-with-roslyn/</link>
      <pubDate>Mon, 25 Apr 2016 20:02:55 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/04/building-strongly-typed-application-configuration-utility-with-roslyn/</guid>
      <description>&lt;p&gt;In this post we will have a look at how, with just several lines of Roslyn code, you can build an extremely cool and powerful utility - a library allowing you to provide configuration for your application as a strongly typed C# script file.&lt;/p&gt;
&lt;p&gt;This post was inspired by the &lt;a href=&#34;https://github.com/config-r/config-r&#34;&gt;ConfigR&lt;/a&gt; library, which provides this type of functionality through scriptcs (I also blogged about ConfigR &lt;a href=&#34;https://www.strathweb.com/2014/10/using-configr-configuration-source-asp-net-vnext/&#34;&gt;before&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;We will, however, deal with marshalling configuration data between the C# configuration and the parent app differently than ConfigR does.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Enabling C# 7 Features in Visual Studio “15” Preview</title>
      <link>https://www.strathweb.com/2016/03/enabling-c-7-features-in-visual-studio-15-preview/</link>
      <pubDate>Thu, 31 Mar 2016 02:16:25 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/enabling-c-7-features-in-visual-studio-15-preview/</guid>
      <description>&lt;p&gt;Yesterday, at Build, Microsoft released the &lt;a href=&#34;https://www.visualstudio.com/news/vs15-preview-vs&#34;&gt;first public preview of Visual Studio &amp;ldquo;15&amp;rdquo;&lt;/a&gt; - the next iteration of Visual Studio.&lt;/p&gt;
&lt;p&gt;One of the main reasons why you&amp;rsquo;d want to try it out already is to be able to use some of the heralded C# 7 features - such as binary literals, local functions or pattern matching (to name just a few).&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s been possible to test out these features in a slightly hacky way before (&lt;a href=&#34;https://joshvarty.wordpress.com/2016/02/10/lrn-quick-tip-how-to-test-out-c-7-features-with-roslyn/&#34;&gt;see Josh&amp;rsquo;s post&lt;/a&gt;) - by building Roslyn from source and deploying it into VS using the CompilerExtension VSIX, but of course it&amp;rsquo;s much easier and convenient to just use C# 7 features directly in VS &amp;ldquo;15&amp;rdquo; now.&lt;/p&gt;
&lt;p&gt;In this post I&amp;rsquo;m gonna show you how to enable the experimental C# 7 features - because they are by default not available.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Roslyn scripting on CoreCLR (.NET CLI and DNX) and in memory assemblies</title>
      <link>https://www.strathweb.com/2016/03/roslyn-scripting-on-coreclr-net-cli-and-dnx-and-in-memory-assemblies/</link>
      <pubDate>Thu, 10 Mar 2016 17:46:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2016/03/roslyn-scripting-on-coreclr-net-cli-and-dnx-and-in-memory-assemblies/</guid>
      <description>&lt;p&gt;For a while now, the Roslyn C# scripting APIs (&lt;a href=&#34;https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp.Scripting&#34;&gt;Microsoft.CodeAnalysis.CSharp.Scripting&lt;/a&gt;) have been portable, and supported cross platform usage.&lt;/p&gt;
&lt;p&gt;However, I recently ran into a few difficulties regarding using the Roslyn Scripting APIs in .NET CLI (which is replacing DNX) context. The solution was to use a lower level unmanaged CoreCLR API - and since they it’s not that well documented, I thought it would be beneficial to document it in a blog post.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Adding C# Scripting to Your Development Arsenal</title>
      <link>https://www.strathweb.com/2015/12/adding-c-scripting-to-your-development-arsenal/</link>
      <pubDate>Tue, 01 Dec 2015 17:44:51 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/12/adding-c-scripting-to-your-development-arsenal/</guid>
      <description>As part of my efforts to popularize C# scripting in the .NET community (which, hopefully, you have noticed by following this blog, my Twitter or my Github) and in celebration of the first stable release of Roslyn scripting packages on Nuget yesterday, I published a guest post at Canadian Developer Connection blog - Adding C# Scripting to Your Development Arsenal.
You can read the post here, and hopefully you find it useful.</description>
    </item>
    
    <item>
      <title>Using Roslyn and unit tests to enforce coding guidelines and more</title>
      <link>https://www.strathweb.com/2015/09/using-roslyn-and-unit-tests-to-enforce-coding-guidelines-and-more/</link>
      <pubDate>Fri, 25 Sep 2015 11:48:37 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/using-roslyn-and-unit-tests-to-enforce-coding-guidelines-and-more/</guid>
      <description>&lt;p&gt;Last year, during a few of my Roslyn talks, I was presenting a cool idea of leveraging Roslyn in unit tests to enforce a certain style in code, and in general inspect the consistency of the code in various ways.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a really powerful concept, and something I wanted to blog about, but of course forgot - until I was reminded of that yesterday on Twitter.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s have a look.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Hacking DNX to run C# scripts</title>
      <link>https://www.strathweb.com/2015/09/hacking-dnx-to-run-c-scripts/</link>
      <pubDate>Tue, 01 Sep 2015 13:29:49 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2015/09/hacking-dnx-to-run-c-scripts/</guid>
      <description>&lt;p&gt;Because of my considerable community involvement in promoting C# scripting (i.e. &lt;a href=&#34;https://github.com/scriptcs/scriptcs&#34;&gt;here&lt;/a&gt; or &lt;a href=&#34;https://github.com/OmniSharp/omnisharp-roslyn&#34;&gt;here&lt;/a&gt;), I thought the other day, why not attempt to run C# scripts using DNX?&lt;/p&gt;
&lt;p&gt;While out of the box, DNX only compiles proper, traditional C# only, thanks to the compilation hooks it exposes, it is possible to intercept the compilation object prior to it being actually emitted, which allows you to do just about anything - including run C# scripts.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s explore more.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Razor views pre-compilation with ASP.NET 5 and MVC 6</title>
      <link>https://www.strathweb.com/2014/12/razor-views-pre-compilation-asp-net-5-mvc-6/</link>
      <pubDate>Fri, 12 Dec 2014 10:36:22 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/12/razor-views-pre-compilation-asp-net-5-mvc-6/</guid>
      <description>&lt;p&gt;In previous versions of MVC framework, running on top of the &amp;ldquo;classic&amp;rdquo; ASP.NET runtime, it was quite common for developers to switch view compilation on, so that the views get compiled upfront, allowing you to see any errors at compile time, rather than at runtime.&lt;/p&gt;
&lt;p&gt;This was done by a simply adding &lt;em&gt;&lt;MvcBuildViews&gt;true&lt;/MvcBuildViews&gt;&lt;/em&gt; to your &lt;em&gt;csproj&lt;/em&gt; file.&lt;/p&gt;
&lt;p&gt;Given that everything changes in the new ASP.NET 5 world, how would you do it now? Let&amp;rsquo;s explore.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building refactoring tools (diagnostics and code fixes) with Roslyn</title>
      <link>https://www.strathweb.com/2014/10/building-refactoring-tools-code-fixes-roslyn/</link>
      <pubDate>Mon, 13 Oct 2014 10:01:16 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2014/10/building-refactoring-tools-code-fixes-roslyn/</guid>
      <description>&lt;p&gt;Some time ago &lt;a href=&#34;https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/&#34;&gt;I blogged&lt;/a&gt; about building next generation Visual Studio support tools with Roslyn. This was when Roslyn was still on its 2012 CTP. A lot has changed since then, with &lt;a href=&#34;http://roslyn.codeplex.com&#34;&gt;Roslyn going open source&lt;/a&gt;, and new iterations of the CTPs getting released.&lt;/p&gt;
&lt;p&gt;Most of the APIs used in the original have changed, so I thought it would be a good idea to do a new post, and rebuilt the sample used in the old post from scratch, using the latest Roslyn CTP.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Leveraging Roslyn to author ASP.NET Web API without recompiling</title>
      <link>https://www.strathweb.com/2013/03/leveraging-roslyn-to-author-asp-net-web-api-without-recompiling/</link>
      <pubDate>Sat, 16 Mar 2013 17:10:31 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/03/leveraging-roslyn-to-author-asp-net-web-api-without-recompiling/</guid>
      <description>&lt;p&gt;Some time ago I posted a &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;mini-series of posts&lt;/a&gt; about using Roslyn to script Web API, and that has gotten some great response. In that original post, I mentioned &amp;amp; used, without going into too much details, a very useful &amp;ldquo;compiler as a service&amp;rdquo; feature Roslyn offers.&lt;/p&gt;
&lt;p&gt;Recently, &lt;a href=&#34;https://twitter.com/gblock&#34;&gt;Glenn Block&lt;/a&gt; started a very exciting project called &lt;a href=&#34;https://github.com/scriptcs/scriptcs/tree/dev&#34;&gt;scriptcs&lt;/a&gt; (which now &lt;a href=&#34;https://twitter.com/jrusbatch&#34;&gt;Justin Rusbtach&lt;/a&gt; and I happen to be a part of too) to provide a seamless/node.js-esque scripting experience for C# and in that project we indeed leverage on Roslyn heavily - to do some behind the scenes tricks to hide the compilation aspect from the user, so that it really resembles pure script execution.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Building Web API Visual Studio support tools with Roslyn</title>
      <link>https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/</link>
      <pubDate>Sun, 03 Feb 2013 18:57:59 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2013/02/building-web-api-visual-studio-support-tools-with-roslyn/</guid>
      <description>&lt;p&gt;In my humble opinion, Microsoft Roslyn is one of the most exciting things on the .NET stack. One of the many (MANY) things you can do easily with Roslyn, is write your own development-time code analysis tools.&lt;/p&gt;
&lt;p&gt;We have talked about Roslyn scripting capabilities &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;on this blog&lt;/a&gt; before (&lt;a href=&#34;https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/&#34;&gt;twice actually&lt;/a&gt;). Let&amp;rsquo;s look at code analysis today and see how we could built tools that could help Web API developers build nice clean HTTP services.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scripting Web API self host with Roslyn CTP – Part 2</title>
      <link>https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/</link>
      <pubDate>Wed, 03 Oct 2012 00:58:30 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/10/scripting-web-api-self-host-with-roslyn-ctp-part-2/</guid>
      <description>&lt;p&gt;This is part two of the series - if you haven&amp;rsquo;t read part one &lt;a href=&#34;https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/&#34;&gt;check it out&lt;/a&gt; before proceeding.&lt;/p&gt;
&lt;p&gt;Last time we did some cool stuff with using C# script files to instantiate a working Web API server - by executing them with RCSI and C# interactive window.&lt;/p&gt;
&lt;p&gt;In part two, let&amp;rsquo;s use Roslyn to build our own scripting application (custom C# console), which will act as an input window for the user; user will be able type C# code that&amp;rsquo;s supposed to be executed and run it (something that services such as &lt;a href=&#34;https://compilify.net/&#34;&gt;Compilify&lt;/a&gt; offer). We will expose Web API assemblies in that context, allowing the user to type in the code required for the Web API server to be run.&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Scripting Web API self host with Roslyn CTP – Part 1</title>
      <link>https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/</link>
      <pubDate>Thu, 27 Sep 2012 10:46:06 +0000</pubDate>
      
      <guid>https://www.strathweb.com/2012/09/scripting-web-api-self-host-with-roslyn-ctp-part-1/</guid>
      <description>&lt;p&gt;If you follow me on &lt;a href=&#34;https://twitter.com/filip_woj&#34;&gt;Twitter&lt;/a&gt; you probably already know that recently I&amp;rsquo;ve been playing around with &lt;a href=&#34;http://en.wikipedia.org/wiki/Microsoft_Roslyn&#34;&gt;Roslyn&lt;/a&gt;. If you don&amp;rsquo;t know about Roslyn, in very short, you can think of it as &amp;ldquo;compiler as a service&amp;rdquo;.&lt;/p&gt;
&lt;p&gt;There is a whole plethora of stuff that Roslyn allows us to do, one of the coolest being the scripting API - enabling us to use C# as a script language (think i.e. Perl or Python). So I had this idea, why not script a fully functional web server through Web API self host?&lt;/p&gt;
&lt;p&gt;More after the jump.&lt;/p&gt;</description>
    </item>
    
  </channel>
</rss>
