joelmartinez / dotnet-core-roslyn-sample

Simple sample of using Roslyn on .NET Core

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Roslyn in .NET Core

This is a simple example of using Roslyn to compile some code from a string, load it into the currently executing AppDomain, and activate and invoke the code. It is based on this article and was adapted for the slightly different API surface area on .net core.

Dependencies

This was written to work with .NET Core 2.2.

Running the Sample

This example uses bash, but you can run this from any dotnet core supported platform

git clone https://github.com/joelmartinez/dotnet-core-roslyn-sample.git
cd dotnet-core-roslyn-sample
dotnet restore && dotnet run

About

Simple sample of using Roslyn on .NET Core

License:MIT License


Languages

Language:C# 100.0%