Open Nukiloco opened 2 years ago
A minimal reproduction project would be appreciated, especially if the conditions to reproduce the error are to set a custom PackageReference
and TargetFramework
in the solution.
~The Godot C# project is a library so netcoreapp3.1
is not a valid framework. You have to use netstandard
.~ Nevermind I got confused.
A minimal reproduction project would be appreciated, especially if the conditions to reproduce the error are to set a custom
PackageReference
andTargetFramework
in the solution.
Currently making one right now.
The Godot C# project is a library so
netcoreapp3.1
is not a valid framework. You have to usenetstandard
.
Will also try to switch to a netstandard to see if that works.
netstandard uses net framework which system.runtime.loader only exists on net core, that's why I was using netcoreapp3.1 earlier
again though using netcoreapp3.1 did work and did build successfully until i added a new script still working on the minimal reproduction project
Edit: actually now searching it up again, i don't think what I said about netstandard was true
https://stackoverflow.com/questions/60982315/assemblydependencyresolver-not-resolving
From searching it up, yea I can't use netstandard here, I can only use netcoreapp3.1
I assume I would have to find another way to load in dynamic c# code or see if I can load in assembly without using assembly dependency resolver
Yea ok at this point, this seems like this is happening with any package that has to do with code compiling.
modules/mono/csharp_script.cpp:2306 - Exception thrown from constructor of temporary MonoObject:
modules/mono/mono_gd/gd_mono_utils.cpp:369 - System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
modules/mono/csharp_script.cpp:2306 - Exception thrown from constructor of temporary MonoObject:
modules/mono/mono_gd/gd_mono_utils.cpp:369 - System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.CodeAnalysis, Version=3.11.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
I installed a new package, got the same errors, and downgraded it, which I still got the same errors anyways.
Though what seems strange is that on Version=4.0.0.0
the actual version was 4.0.0-5.final
.
It seems like its adding an extra .0
to every package that gets installed.
Note that the Godot console is complaining about this though there is no errors in the build output. I guess I will make a minimal example repository that includes this package instead since its doing every time.
This is probably related to my problem, since my problem involves MessagePack and PostSharp which both add compile steps. https://github.com/godotengine/godot/issues/53693
Godot version
v3.4.beta6.mono.official [3e2bb415a]
System information
Windows 10, Nvidia GTX 750 Ti
Issue description
Before you ask, yes this builds and runs. Though as soon as I add in a new csharp script and click back into Godot, Godot crashes with this error:
Note that I'm not using version 4.1.1.0, I'm using version 4.3.1
csproj
Steps to reproduce
System.Runtime.Loader
..mono/temp
and restore your project.Minimal reproduction project
No response