oleg-shilo / cs-script.core

.NET Core port of CS-Script
MIT License
100 stars 18 forks source link

C#8 support #9

Closed Bukran closed 3 years ago

Bukran commented 4 years ago

Hello,

Is C#8 supported? I intend to use CSScript.Evaluator.LoadFile where T is an interface with a default method.

If C#8 is not available, the compiler obviously throws an exception: 'class does not implement interface member'.

Thanks in advance.

oleg-shilo commented 4 years ago

Hi Bukran, the specific syntax version is supported/unsupported not by CS-Script itself but by the underlying services - Roslyn.

This is the package responsible for the actual compilation: image

Thus you will need to ensure that you are using the package that can handle C#8 syntax. Unfortunately I cannot tell you which version of that package is. But probably if you google for Roslyn + C#8 then you may find some info.

Bukran commented 3 years ago

I think this issue has been solved after updating Microsoft.CodeAnalysis.CSharp.Scripting