-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Adding a nuget package makes Godot not build #30970
Comments
I just wanted to point out that this happened to me too. I added the (Oddly enough, adding the package reference, running |
It would seem this is due to an unsupported format in the package reference you added to your
Maybe this is due to a parsing error when godot reads the csproj ? |
@spoutnickgp Indeed that fixes the issue for me. It's a little unfortunate that Godot prints out quite non-descriptive errors for these, though. I also ran into another parsing error (this time in a |
I just reopened this issue to see where it was at, i'll make sure to try your work around tonight @spoutnickgp |
Nevermind. Tried the work around, and despise building correctly, I can't seem to be able to use the library (missing using directive or assembly reference). I tried several thing, notably adding the package nuget both with the nuget package manager, or the dotnet command line. Neither worked. |
related: #15386 |
What causes this bug is that we're using Mono's own |
To anyone with this problem, beware: do not use download nuget.exe and do I stumbled across this while trying to get Tuples working: #34803 (comment) |
I'm adding Tomlyn with:
Then I use |
The doc is pretty misleading on this.
In the editor settings use: General -> Mono -> Builds -> Build Tool: MSBuild (VS Build Tools) if on Windows or MSBuild (Mono) for other platforms. Big thanks to this article: |
What to you mean with "you need the good formatting for package ref"? |
The one you mentioned, not the one in the doc. |
I think the docs are up to date, arent they? At least this looks similar to what I've got.
That part did the trick for me. Thanks a lot! |
You're welcome. |
Godot version: 3.1.1-stable-mono-win64
**OS/device including version:**windows 10
**Issue description:**Godot doesn't include nuget package, and throw an error on build.
Steps to reproduce: Make any C# project. Attach a script to a node. In VS Code, add a nuget package (Using nuget, or by hand.), and restore the project. Try to build. You get :
ERROR: generate_scripts_metadata: Method/Function Failed, returning: FAILED At: modules/mono/editor/csharp_project.cpp:155 ERROR: editor_build_callback: Condition ' metadata_err != OK ' is true. returned: false At: modules/mono/editor/godotsharp_builds.cpp:383 ERROR: call_build: A Godot Engine build callback failed. At: editor/editor_node.cpp:4666
If you remove the project, and restore again, you get no error. Build successful.
In case it's relevant, i was trying to add Newtonsoft.json, latest version to this day (12.0.2).
I tried another version
I tried targetting another framework.
I tried adding the definition to the packagereference inside the .csproj (sorry, I tried that two days ago, and I can't find it again...)
Nothing works, i'm beat, and it's been two days of searching already.... any ideas?
Minimal reproduction project: Minimal test project. Just open & build.
test.zip
The text was updated successfully, but these errors were encountered: