Hi,
this is a very specific and technical question which I doubt is of any interest to anyone else, but I will try to ask the question…at the same time the question is fairly general without an example provided so I understand it is a Hail Mary shot in search of an answer.
So, I am trying to use Microsoft.CodeAnalysis and Microsoft.CodeAnalysis.Scripting packages to do some runtime compiling…I provide a class with a function in the form of a string and it is supposed to compile the code and run it.
I first created a simple Console App to test it and it all works.
However, when I try it within the Rhino Plug-in it always stops and tells me it cannot load the dll:
Without getting too technical I am trying two approaches, one is the “lighter” Scripting version (with CSharpScript.RunAsync()
) and another is actually compiling the Assembly (using CSharpCompilation
):…
…but I cannot test or debug the solutions because in all scenarios the needed Dll cannot be loaded (in the assembly compiling version the Microsoft.CodeAnalysis.dll cannot be loaded, if I am not mistaken.)
So…my hope is that there is an easy answer like:
Rhinocommmon is already using an earlier version of this library and that is why it cannot load it…you need to install the previous version
The dll is actually there in the folder, right next to the rhino plugin so that is not a problem for sure…so my best guess is that there is some mismatch in the version…or some incompatibility with net 7.0 windows…not sure.
I would appreciate any ideas.
Thanks
Milos