Is there is an easy way to compile and run C# through roslyn without injecting .NET Core library?
.
12 Replies
What do you mean by injecting
When you compile C# through dotnet it will contain the .net core lib by default
I just want to avoid this, in a not very-much-complicated way
for educational purposes
You somehow have code that doesn't use any core .net types?
That's what I want to do
But do you actually have code like that
An empty class works
no?
But it doesn't do anything useful
or does it derivate from Object
And that
Yes that's for curiosity purpose only
This is basically the one and only time I would say you'd need to use csc directly
But, also, you'll need to do things like define
object
And you won't really be able to run it anywhere
So, "easy" is relativeGotcha, Ill do some experiments