godotengine / godot

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

Export to win desktops doesn't response. .NET: Failed to load hostfxr at: (modules/mono/mono_gd/gd_mono.cpp:388) #85003

Open ZHTis opened 12 months ago

ZHTis commented 12 months ago

Godot version

v4.1.2.stable.mono.official

System information

win11 Vulkan API 1.2.188 - Forward+ - Using Vulkan Device #0: AMD - Radeon (TM) Pro WX 5100 Graphics

Issue description

The game is okay in editor, and as it being exported there was no error, but the exported exe shows no response to any key or mouse event.

This is what is reported in the console window:

Vulkan API 1.2.188 - Forward+ - Using Vulkan Device #0: AMD - Radeon (TM) Pro WX 5100 Graphics

ERROR: .NET: Failed to load hostfxr
   at: (modules/mono/mono_gd/gd_mono.cpp:388)
Viewport Resolution is: (1920, 1080)
---SAVE---user://save_2023-11-17-15.16.12.csv----SAFE----

The exe will crash ant exit after a few mouse clicks.

Steps to reproduce

This is export settings: image

It used to be fine when exporting all, there were 4 items: a folder contained lots of .dll files, a pck and a runand a release. Now the folder with .dll was lacked, but no error reported when exporting, so I don't know how to fix this. Is there anything I should check or missed?

Minimal reproduction project

https://github.com/ZHTis/godot2d_Ray

raulsntos commented 12 months ago

Your MRP doesn't contain a solution file (.sln) so the export plugin doesn't detect your project as a C# project.

You can recreate the solution file from the Godot editor: Project > Tools > C# > Create C# solution (note that it will also overwrite your .csproj).