![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | thedudelebowski |
I get the error below when trying to build a C# project in Godot 3.1. I was previously using Godot 3.0.6 for many months with C# projects with no issues at all, then I started using Godot 3.1. Now I can’t even open previously ok C# projects in Godot 3.0.6 (it just crashes).
I’m having no issues with projects that just use GDscript in 3.0.6 or 3.1, all working fine.
Does anybody know what is going on?
Project "Test C Sharp 3.1.sln" (Build target(s)):
Message: Building solution configuration "Tools|Any CPU".
Project "Test C Sharp 3.1.csproj" (default targets):
C:\Program Files\Mono\lib\mono\msbuild\15.0\bin\Microsoft.Common.CurrentVersion.targets(1191,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.5" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed. Note that assemblies will be resolved from the Global Assembly Cache (GAC) and will be used in place of reference assemblies. Therefore your assembly may not be correctly targeted for the framework you intend. [C:\Godot\Test C Sharp 3.1\Test C Sharp 3.1.csproj]
MakeDir: Creating directory ".mono\temp\obj\Tools\".
Done building project "Test C Sharp 3.1.csproj" -- FAILED.
Done building project "Test C Sharp 3.1.sln" -- FAILED.
Hey I hope this doesn’t sound snarky, but have you tried reinstalling .net 4.5 sdk yet? I have had issues with mono on Linux and it was usually caused by me messing with a new mono install. That’d be my first start in troubleshooting.
Secondly, in project settings there should be an option for compiler to use, make sure it’s MSBUILD. I’m not near my computer now so I cant tell you where this is exactly located in Godot.
dhav211 | 2019-09-14 04:31
Thanks for the advice. I have tried reinstalling .net sdk 4.5.1 (couldn’t find plain 4.5 on the MS website), with no effect. I also uninstalled Mono 6.0 and rolled back to version 5.12. Now Godot 3.0.6 is working again and can compile my existing C# projects, which is a good start. But I want to be using Godot 3.1.
Edited: I found that option. It is set to MS Build (Mono). This works fine in Godot 3.0.6 but not 3.1. Changing to MS Build (VS Build Tools) just crashes Godot on build.
Edited again to clarify: On Godot 3.0.6, the project compiles with this set to either MS Build (Mono) or MS Build (VS Build Tools).
thedudelebowski | 2019-09-14 20:00