Skip to content

Instantly share code, notes, and snippets.

@RonenNess
RonenNess / DynamicClassLoader
Created January 25, 2021 15:31
Example on how to dynamically compile and load C# classes in runtime.
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp;
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Reflection;
using Microsoft.CodeAnalysis.Emit;
namespace CSharpDynamicCompileExample