Build Error with C#

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

I’m a c# developer and wanted to try the godot mono version, so i downloaded 3.2.2
When i write a c# Script and add it to my project, i can’t test the scene. It tells me this:

Project "Godot Basic Move and Dodge Game.sln", Build target(s):
Message: The "Debug|Any CPU" project folder configuration is created.
Project "Godot Basic Move and Dodge Game.csproj" (default targets):
	C:\Program Files\dotnet\sdk\3.1.201\Microsoft.Common.CurrentVersion.targets(1177,5): error MSB3644: The reference assemblies for ".NETFramework,Version=v4.7" were not found. To resolve this issue, install the Developer Pack (SDK/target version set) for this framework version, or reorient your application. You can download .NET Framework Developer Packs from https://aka.ms/msbuild/developerpacks. [D:\Goddot\Godot Basic Move and Dodge Game\Godot Basic Move and Dodge Game.csproj]
	The creation of the project "Godot Basic Move and Dodge Game.csproj" is finished -- ERROR.
The creation of the project "Godot Basic Move and Dodge Game.sln" is finished -- ERROR.

I already installed NetFramework from the website written above, i also installed Mono SDK.

:bust_in_silhouette: Reply From: juppi

With .Net framework you also mean Visual Studio Buildtools?

If so, just open the .csproj file in your game folder and change the target framework to 4.8

<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>

They already know about that problem.

perfect, that did work! Thanks for your fast reply!

Wombyte | 2020-07-28 21:39

It also worked for me. Change it to the version installed in your computer.

areynaldo | 2021-02-02 18:42