Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MSBUILD error - A Godot Engine build callback failed #29763

Closed
hammeron-art opened this issue Jun 13, 2019 · 13 comments
Closed

MSBUILD error - A Godot Engine build callback failed #29763

hammeron-art opened this issue Jun 13, 2019 · 13 comments

Comments

@hammeron-art
Copy link

hammeron-art commented Jun 13, 2019

Godot version:

Mono bd937ea

OS/device including version:

Windows 10 Pro

Issue description:

Related to #29290
Mono build fails on Windows. I'm getting this error:

MSBUILD : error MSB1005: Specify a property and its value.
Switch: /p:GodotDefineConstants=GODOT_WINDOWS;GODOT_64;

For switch syntax, type "MSBuild /help"
ERROR: EditorNode::call_build: A Godot Engine build callback failed.
At: editor\editor_node.cpp:4888

This code works just fine on Windows too:

String constants = "GodotDefineConstants=\\\"";
...
constants += "\\\"";

Steps to reproduce:
I just press F5 in the Editor.

Minimal reproduction project:

@neikeq
Copy link
Contributor

neikeq commented Jun 13, 2019

Hmm, @ShyRed commented "\\\"" didn't work for him 🤔 I will check this next week.

@neikeq neikeq self-assigned this Jun 13, 2019
@neikeq neikeq added this to the 3.2 milestone Jun 13, 2019
@ShyRed
Copy link
Contributor

ShyRed commented Jun 14, 2019

@neikeq Still holds true. "\\\"" does not work for me. I tried starting Godot via double click on exe, power shell and via DOS command prompt. No difference...

@hammeron-art What scons build command do you use for building Godot? I'm using scons platform=windows target=debug vsproj=yes module_mono_enabled=yes mono_static=yes -j5 ...

@hammeron-art
Copy link
Author

hammeron-art commented Jun 15, 2019

@ShyRed After generating the glue

scons p=windows -j8 tools=yes module_mono_enabled=yes mono_glue=no
bin\godot.windows.tools.64.mono --generate-mono-glue modules/mono/glue

I build from the vsproj generated from Scons in Visual Studio 2017 IDE so I can use the debugger.

Building from the command prompt was no difference too.
scons p=windows target=release_debug -j8 tools=yes module_mono_enabled=yes vsproj=yes

@hammeron-art
Copy link
Author

By the way, my MSBuild version is 4.7.3056.0

@ShyRed
Copy link
Contributor

ShyRed commented Jun 15, 2019

By the way, my MSBuild version is 4.7.3056.0

You should have a 15.xx version of MSBuild, if you are using VS 2017 (see MSBuild releases)...

Please open a command prompt and enter SET GODOT_DEBUG_MSBUILD=1, start Godot using that command prompt and then build your project. You should get some diagnostic information. For me it looks like:

Running: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" "C:/Work/godotprojects/GodotDefineTest/GodotDefineTest.sln" /v:normal /t:Rebuild "/p:Configuration=Tools" "/l:GodotSharpTools.Build.GodotBuildLogger,c:\Work\Godot\bin/GodotSharp/Tools/GodotSharpTools.dll;C:\Users\pasri\AppData\Roaming/Godot/mono/build_logs/bc6af464fe04590616be6da63cdf11d7_Tools" /p:GodotDefineConstants="GODOT_WINDOWS;GODOT_64;"
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

@hammeron-art
Copy link
Author

hammeron-art commented Jun 15, 2019

@ShyRed I got Build Engine version 4.7.3056.0 because I followed this process https://help.bittitan.com/hc/en-us/articles/115008111067-How-do-I-check-which-version-of-NET-Framework-I-have-installed-
I guess it refers to the standalone .Net framework installation instead of VS own package.

It shows the same version as you with the process you described:

Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

But the command string looks a little different:

Running: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" "F:/Works/magic_builder/merchant/Merchant.sln" /v:normal /t:Build "/p:Configuration=Tools" "/l:GodotSharpTools.Build.GodotBuildLogger,F:\Godot\godot\bin/GodotSharp/Tools/GodotSharpTools.dll;C:\Users\CHRISTIAN\AppData\Roaming/Godot/mono/build_logs/74589932309bbbc5556953b1a3ebca26_Tools" "/p:GodotDefineConstants="GODOT_WINDOWS;GODOT_64;""

It must be causing parsing issues. Comparation at the end:

"..._Tools" /p:GodotDefineConstants="GODOT_WINDOWS;GODOT_64;"
"..._Tools" "/p:GodotDefineConstants="GODOT_WINDOWS;GODOT_64;""

I get this output with proper escaped quotes in the command string with "\\\"" and it works fine

"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin\MSBuild.exe" "F:/Works/magic_builder/merchant/Merchant.sln" /v:normal /t:Build "/p:Configuration=Tools" "/l:GodotSharpTools.Build.GodotBuildLogger,F:\Godot\godot\bin/GodotSharp/Tools/GodotSharpTools.dll;C:\Users\CHRISTIAN\AppData\Roaming/Godot/mono/build_logs/74589932309bbbc5556953b1a3ebca26_Tools" "/p:GodotDefineConstants=\"GODOT_WINDOWS;GODOT_64;\""

@ShyRed
Copy link
Contributor

ShyRed commented Jun 16, 2019

Hey @hammeron-art , thanks for the feedback. I believe the problem might be the result of an outdated GodotSharpTools.dll. The additional quotes you have around /p:GodotDefineConstants="GODOT_WINDOWS;GODOT_64;" have been removed in 60e711a and as far as I know, GodotSharpTools are not updated automatically yet when rebuilding Godot...

In your modules\mono\editor\GodotSharpTools folder there is a GodotSharpTools.sln. Can you build that solution and copy the resulting GodotSharpTools.dll and GodotSharpTools.pdb files into your bin\GodotSharp\Tools folder overwriting the existing ones?

It is strange that escaping makes it work for you, though. I never got that to work and thus removed the quotes from GodotSharpTools... 🤔

@hammeron-art
Copy link
Author

hammeron-art commented Jun 16, 2019

@ShyRed Yeah, I assumed that module_mono_enabled=yes would trigger the GodotSharpTools build too because the doc doesn't mention a manual building for the Tools.
I added GodotSharpTools.csproj in the same solution as Godot C++ and I marked it as a project dependency with output to the final path so the assemblers are always up to date. Now I get the same behavior as yours. Is it possible to include a configuration like this to the buildsystem and generated vsproj?

@neikeq
Copy link
Contributor

neikeq commented Jul 25, 2019

Can this issue considered fixed?

Regarding GodotSharpTools, it was renamed to GodotTools and it's always built by SCons now.

@neikeq
Copy link
Contributor

neikeq commented Jul 26, 2019

If this is still a valid issue, #30842 may fix it.

@hammeron-art
Copy link
Author

hammeron-art commented Aug 1, 2019

#31008 fix the last issue in a fresh build.

@neikeq
Copy link
Contributor

neikeq commented Aug 1, 2019

Was the error MSB1005: Specify a property and its value fixed by #30842?

@hammeron-art
Copy link
Author

Yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants