Roslyn: Compile C# Expressions Without Using the Scripting API

I have an application that processes table structures. Tables have columns and some columns may contain expressions. For example, an expression may look like “row.Price * row.Quantity”. The compiled code should be loaded into the current AppDomain. Also, I didn’t want to use the existing Roslyn Scripting API because I could not get my head around the handling of AppDomains and referencing assemblies in that (I had too little time to dig into that). If you have read this post, you might have an idea what’s comming next. The current post can be understood as an update to the older post with adaptions adjustments to the current version of Roslyn (0.6.4033103-beta).Read More »

In-Memory Run-Time Code Generation With .NET – Part 2

This article is split into 5 posts.

  1. Introduction
  2. Templating Engines
  3. Code Generation From Source
  4. Code Generation From Model
  5. Loading

Read More »