godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.55k stars 20.69k forks source link

The Build Errors of Godot are really annoying !! #49139

Open ash7977 opened 3 years ago

ash7977 commented 3 years ago

Godot version:

3.3.2

OS/device including version:

Win/GLES3

Issue description:

I've been working with Unity for a long time, It's been a while since I decided to launch a new engine for my 2D project and saw Godot engine showcase and videos in Youtube. Then I downloaded the latest version (C# support version). I create an empty c# file and attached it to 2dnode then build :

image

image

Then I searched in the internet, some pointed to it was related to .Net framework version and so on. I installed every version of .NET Framework. I used Visual Studio Installer to install the components, the funny part is that after installation 4.8 and other versions, in the Programs and Features in Control panel, I just have 4.7 version : 😆😆

image image

A person in youtube suggested to change the version of TargetFramework in csproj file of project :

image

I don't know anymore, the error , the workflow is really frustrating , What should I do guys ? any suggestion ?!

Steps to reproduce:

Minimal reproduction project:

amoriqbal commented 3 years ago

32424 Here is an old issue... similar prob. It was fixed and closed. I am not an expert of Mono.

@ash7977 Can you tell me if the following path (and the executable) exists in your system?: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"

ash7977 commented 3 years ago

32424 Here is an old issue... similar prob. It was fixed and closed. I am not an expert of Mono.

@ash7977 Can you tell me if the following path (and the executable) exists in your system?: "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe"

Yes there is the path

amoriqbal commented 3 years ago

Then, I don't know what to do. Please wait for senior devs to help cc @akien-mga.

ash7977 commented 3 years ago

Plz help

nonunknown commented 3 years ago

@ash7977

Also just to ensure, install net framework 472 from this link:

https://dotnet.microsoft.com/download/dotnet-framework/net472

Runtime and Developer Pack!

try to install .net 472 and change the csproj to this:

<Project Sdk="Godot.NET.Sdk/3.3.0">
  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
  </PropertyGroup>
</Project>

Ps: Also after installing both, restart your PC, and start a fresh new project!

ash7977 commented 3 years ago

@ash7977

Also just to ensure, install net framework 472 from this link:

https://dotnet.microsoft.com/download/dotnet-framework/net472

Runtime and Developer Pack!

try to install .net 472 and change the csproj to this:

<Project Sdk="Godot.NET.Sdk/3.3.0">
  <PropertyGroup>
    <TargetFramework>net472</TargetFramework>
  </PropertyGroup>
</Project>

Ps: Also after installing both, restart your PC, and start a fresh new project!

Thank you, but I did this more than 10 times, friend I don't know what's going on inside the stupid game engine

EduardoLemos567 commented 3 years ago

Did you tried installing mono ?

I'm using Godot 3.2.2 on Win7, got .Net 4.7 and 5.0, tried the script first time on Visual Studio Code, omnisharp complained about: The SDK 'Godot.NET.Sdk/3.3.0' specified could not be found. Tried installing Mono 6.12 and problem solved, i'm using it right now, both VSC and Godot flawless.

31 commented 3 years ago

As of Godot Mono 3.2.3+, all you need is the .NET [Core] SDK, so it should be simpler than it was before. Unfortunately the main download site doesn't say it yet, but there's more info in the docs: https://docs.godotengine.org/en/stable/getting_started/scripting/c_sharp/c_sharp_basics.html#setting-up-c-for-godot To sum up:

  1. Install .NET SDK 5.0 from https://dotnet.microsoft.com/download
  2. In Godot, open Editor -> Editor Settings..., then search for Build Tool. Select dotnet CLI from the dropdown.

(I have a PR open to update the site at https://github.com/godotengine/godot-website/pull/341.)