-
-
Notifications
You must be signed in to change notification settings - Fork 18.9k
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
Unable to Build Project with c# solution (Godot 4.1.1) #81790
Comments
Deleting the csproj will make Godot think your project doesn't contain C# code and will not build it. In the steps to reproduce, you mention creating the solution as one of the steps after creating a script. Godot should automatically create the solution if it doesn't exist when creating a C# script, did that not happen for you? This error is likely to show up when your C# project does not compile, check the MSBuild panel to see if there were any errors building your project. Please upload a minimal reproduction project to make this easier to troubleshoot. |
@raulsntos yes, you right. If i create с#script - godot will make solution as well. In MSBuild panel there is one error- "The build method threw an exception." Actualy i dont have more info about that. There is reproduction project |
You should be able to right-click that error and copy it, it should contain the exception that was thrown. It could be that you don't have the dotnet CLI in the PATH environment variable, can you run the |
@raulsntos i tried to copy error but it didnt provide more info , only "The build method threw an exception." There is dotnet info comand's result |
@raulsntos i see, 4 real environment variables not set, will try to fix this |
That's weird, from what I can see that message should always include the exception in a new line: godot/modules/mono/editor/GodotTools/GodotTools/Build/BuildManager.cs Lines 99 to 101 in 4df80b0
Can you see the exception message if you hover the error? Also, since the exception is printed to the console, try opening Godot from a terminal and see the output there.
It seems that you do have dotnet in the PATH, otherwise you wouldn't be able to execute the command, right? |
@raulsntos i tried to launch with console too, but there's no second line . I checked and add again dotnet in the PATH ( maybe it already was), also i added DOTNET_ROOT variable too , but there's no effect . Also i asked my friend to share his dotnet --info screen and it looks like mine. Btw i can easily run console/unity projects , so i dont think there is an .net issue , also my friends who stared using Godot dont have such problem ,maybe i need some kind of extra win/godot setup? |
@raulsntos in godot i changed verbosity level to detailed , so for now in console i see new exception |
It seems Godot can't find dotnet in your PATH environment variable. Try executing |
I'm experiencing the same issue on Ubuntu 22.04 and I just verified that dotnet is in my path. The issue still persists. Also I was building perfectly fine with a C# solution. I seem to have done something however which made it no longer work. Since I just started this project last night, it's very small (like 4 scenes and 3 scripts). If it helped, I could upload it. |
I have solved the issue on my end. I decided to run |
@raulsntos yeah, it contains . I have some dotnet instances in diffrent paths , and also in system and user variables for sure. I tried to remove from PATH some other instances and leave just one ( from user documents / program files ) , but there's no result. There is no a way to set the path directly in godot ? |
In 3.x there are multiple build tools, which one are you using? It should default to dotnet CLI, unless it can't find it. In both 3.x and 4.x we use the same code to find dotnet in the PATH, so if 3.x is working I'm guessing it's not using the dotnet CLI as build tool. You check the value for this setting: Your PATH environment variable seems to contain the path to the dotnet CLI, so it should be able to find it. Can you also share the output of |
@raulsntos so , i was wrong about v3.5 , it can run c# code, but it also give me an error when i press Build button . Build tool is dotnet CLI |
@raulsntos alright, i've found temporary solution from this topic ( about same problem on Mac) #38985 |
I'm not sure if this will help anyone, but make sure in
Make sure |
Godot version
4.1.1 Stable
System information
Windows 10 - Gotot 4.1.1 Stable
Issue description
Run Game failed if i have c# solution in project with these errors
editor/editor_node.cpp:6468 - An EditorPlugin build callback failed.
Transient parent has another exclusive child
If i delete csproj file it runs well , but cant rebuild ( it will regenerate csproj and have error again)
I'm using Rider with gotot plugin ,MSBuild dotnet 6
Steps to reproduce
Create Empty project
Create c# script
Create c# solution
Run it
Minimal reproduction project
Reproduction Project
Test5 copy.zip
The text was updated successfully, but these errors were encountered: