bryanedds / Nu

Repository hosting the open-source Nu Game Engine and related projects.
MIT License
1.12k stars 156 forks source link

New project fails to load? #692

Closed Derpford closed 8 months ago

Derpford commented 9 months ago

For whatever reason, after creating a new project in Gaia, I get the following error when trying to run Gaia again:

PS C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master> dotnet run --project .\Nu\Nu.Gaia\
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu\Nu.fsproj : warning NU1903: Package 'Magick.NET-Q8-AnyCPU' 7.5.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-j7hp-h8jx-5ppr [C:\Users\Breez\fsharp-prac
tice\Nu-RPG-experiment-master\Nu\Nu.Gaia\Nu.Gaia.fsproj]
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu.Pipe\Nu.Pipe.fsproj : warning NU1903: Package 'Magick.NET-Q8-AnyCPU' 7.5.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-j7hp-h8jx-5ppr [C:\Users\Breez\f 
sharp-practice\Nu-RPG-experiment-master\Nu\Nu.Gaia\Nu.Gaia.fsproj]
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu.Gaia\Nu.Gaia.fsproj : warning NU1903: Package 'Magick.NET-Q8-AnyCPU' 7.5.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-j7hp-h8jx-5ppr
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu.Gaia\Nu.Gaia.fsproj : warning NU1903: Package 'Magick.NET-Q8-AnyCPU' 7.5.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-j7hp-h8jx-5ppr
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu\Nu.fsproj : warning NU1903: Package 'Magick.NET-Q8-AnyCPU' 7.5.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-j7hp-h8jx-5ppr
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu.Pipe\Nu.Pipe.fsproj : warning NU1903: Package 'Magick.NET-Q8-AnyCPU' 7.5.0.1 has a known high severity vulnerability, https://github.com/advisories/GHSA-j7hp-h8jx-5ppr
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu\Render\Renderer2d.fs(169,11): warning FS3548: Pattern discard is not allowed for union case that takes no data. [C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu\Nu.fsproj]
C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu\Render\Renderer3d.fs(757,11): warning FS3548: Pattern discard is not allowed for union case that takes no data. [C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu\Nu.fsproj]
2023-12-19 20:31:39.6427|Info|Failed to load Nu game project from 'C:/Users/Breez/fsharp-practice/Nu-RPG-experiment-master/Projects/RpgTest/bin/Debug/net7.0/RpgTest.dll' due to: "Nu.Gaia.Gaia+filePathAndDirNameAndTypesOpt@981"
Process terminated. Assertion Failed
2023-12-19 20:31:39.6447|Trace|Invalid Nu Assembly: C:/Users/Breez/fsharp-practice/Nu-RPG-experiment-master/Projects/RpgTest/bin/Debug/net7.0/RpgTest.dll
   at Nu.Log.trace(String message) in C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu\Core\Log.fs:line 65
   at Nu.Gaia.Gaia.selectNuPlugin(NuPlugin gaiaPlugin) in C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu.Gaia\Gaia.fs:line 1017
   at Nu.Gaia.Gaia.run(NuConfig nuConfig, NuPlugin gaiaPlugin) in C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu.Gaia\Gaia.fs:line 2980
   at Nu.Gaia.Program.main(String[] _arg1) in C:\Users\Breez\fsharp-practice\Nu-RPG-experiment-master\Nu\Nu.Gaia\Program.fs:line 15

The .dll file it's looking for doesn't exist. Was it supposed to be created when I created a new project? I'm using VS Code.

Derpford commented 9 months ago

Equally weird: The newly-created project has warnings in it: image I'm...pretty sure I have netstandard installed, I think it came with dotnet. It ought to be managed by nuget anyway, right? (That was a headache and a half to set up in the first place...)

bryanedds commented 9 months ago

The .dll file it's looking for doesn't exist. Was it supposed to be created when I created a new project? I'm using VS Code.

I'm guessing that if the DLL doesn't exist, you didn't build the new project you just made. Let's make sure you've done that first.

bryanedds commented 9 months ago

Sounds like you're already building the new project.

Could you join us in our discord? It's a lot easier to go back and forth with issues like this here - https://discord.com/invite/Fw2pFvA5QF

bryanedds commented 9 months ago

Also, I just fixed the error reporting for your specific case - https://github.com/bryanedds/Nu/commit/42166f0fd0fb170eddb796b4a4038177d92d143a

bryanedds commented 9 months ago

I'm...pretty sure I have netstandard installed, I think it came with dotnet. It ought to be managed by nuget anyway, right? (That was a headache and a half to set up in the first place...)

To me, is sounds like you didn't install .net properly. Are you on linux?

Derpford commented 9 months ago

To me, is sounds like you didn't install .net properly. Are you on linux?

I'm on Windows. Windows 11, specifically. Give me a minute to join the discord.

Derpford commented 9 months ago

After some discussion in the discord, the problem's been resolved. For some reason, dotnet 8 was unable to provide dotnet 7's netstandard, so I had to go install the dotnet 7 SDK.