hei all,
Trying to build an app exposing a REST API with gamma 2019.2 0169 using the Grapevine nuget. As VL does not handle attributes for now, I know such code could not be implemented, but that’s not the issue now (I was planning to wrap that in a dll to use it in VL) :
[RestResource]
public class TestResource
{
[RestRoute]
public IHttpContext HelloWorld(IHttpContext context)
{
context.Response.SendResponse("Hello, world.");
return context;
}
}
So, when I load the nuget to do something simple as this :
The console displays this error message :
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime.Loader, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Runtime.Loader, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
Naively tried adding it as a dependency (either by downloading and referencing the System.Runtime.Loader
nuget, and also adding a ref to mscorlib
), but the error is the same in both cases.
Now, I copied the System.Runtime.Loader
v4.0.0 dll next to Grapevine.dll
and the error changed to
System.TypeLoadException: Could not load type 'System.Runtime.Loader.AssemblyLoadContext' from assembly 'System.Runtime.Loader, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Looking at MSDN, it seems that AssemblyLoadContext
only exists in .NET Core. Does this mean that VL won’t be able to pick it up for now ?
Also, before that, I also tried copying the last version of System.Runtime.Loader
(4.3.0), and gamma threw this exception on startup ( System.InvalidCastException: Unable to cast object of type 'DummyConcreteTypeSymbol' to type 'VL.Lang.Platforms.Roslyn.ImportedConcreteTypeSymbol'.
).
Any hint on what’s going on there ?
Thanks !