Why do Errors in File "Sdk.targets" appear, when trying to build a Project including C# scripts ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Duffft

Hey,
I have the problem with every project that includes C#-scripts (my own projects and also Templates like the “Pong with C#”). When I want to test a scene or the whole project I get 2 Errors:


C:\Users.….nuget\packages\godot.net.sdk\3.3.0\Sdk\Sdk.targets(19,9): The “TargetFrameworkFallbackSearchPaths” parameter is not supported by the “GetReferenceAssemblyPaths” task. Verify the parameter exists on the task, and it is a settable public instance property.
Code: MSB4064
File: C:.….nuget\packages\godot.net.sdk\3.3.0\Sdk.targets

and

C:\Users.….nuget\packages\godot.net.sdk\3.3.0\Sdk\Sdk.targets(16,5): The “GetReferenceAssemblyPaths” task could not be initialized with its input parameters.
Code: MSB4063
File: C:.….nuget\packages\godot.net.sdk\3.3.0\Sdk.targets


I already checked the Requirements and even reinstalled MSBuild Tools via Mono SDK and Visual Studio Build Tools.
I also tested to run the projects on another machine were it works without any problems (Same Godot version, Same OS (Windows 10)).
In projects where only GDScript scripts are included the errors do not appear.

Does anyone know what the problem could be?

Hi, it seems you have issue with MSBuild Tools, in order to fix this I know one solution, install .Net Core SDk with Visual Studio Installer or .NET Core SDK

Then you should check the build settings goto menu Editor then select Mono–>Builds–>Build Tools set it to donet cli

Ahmed | 2021-10-31 08:59

Hey, it works! Thank you! I thought the basic “MSBuild Tools” is enough.

Duffft | 2021-10-31 10:55

:bust_in_silhouette: Reply From: philomelus

Try installing an x86 sdk. Even though I was building for x64, I kept getting this error until I installed the x86 32 bit version of the sdk.

I even tried using a global.json with the version I had installed, specified. Got a similar error, until I installed the 32 bit sdk.