I referenced via Nuget Microsoft.CodeAnalysis.CSharp.Scripting
Version 2.3.0.0 which pulled in numerous references, including System.IO.FileSystem
Version 4.0.2.0.
When I try to execute the following code return await _scriptObjects[scriptName].Script.RunAsync(_scriptObjects[scriptName].SharedObject, cancellationToken);
An error is thrown. What am I missing?
I think I found the solution...adding
<PropertyGroup>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
</PropertyGroup>
to the project file generated the binding redirects automatically and solved my problem. I also added those to other project files that have depend on my original Roslyn script class library.