Open Shiftyhead2 opened 1 week ago
I was able to reproduce the issue.
I have a bit to learn with regards to contributing a fix to the code here but I can offer more specifics on what the issue is. The first line of the .csproj file associated with the project is:
<Project Sdk="Godot.NET.Sdk/4.4.0-dev">
This doesn't exist in nuget.org. Looks like it is now this:
<Project Sdk="Godot.NET.Sdk/4.4.0-dev.3">
If you update your .csproj file to include the .3, it should build. Has the "works on my machine" stamp of approval, anyway.
As stated in official documentation
By default, all development builds share a version number, which can cause some issues with caching of the NuGet packages. To solve this issue either use GODOT_VERSION_STATUS to give every build a unique version or delete GodotNuGetFallbackFolder after every build to clear the package cache.
Basically the solution for maintainers is to set the env variable GODOT_VERSION_STATUS to specific version before building the packages (in other words running build_assemblies.py
). For example, enter command in powershell:
$env:GODOT_VERSION_STATUS = "dev3"
This will tell MSBuild to find Godot.NET.Sdk/4.4.0-dev.3
in global directories or download from nuget.org
It also implies that maintainers have to upload packages to nuget.org
I'm also having this issue.
For anyone having this issue here is how you can solve it.
Above steps should auto change your .csproj but just double check your .csproj has the following
<Project Sdk="Godot.NET.Sdk/4.4.0-dev.3">
There is also an alternative solution for you (so there is no need to rewrite .csproj every time you start the Redot engine)
Use the command
dotnet nuget add source "C:\your_location\redot-editor-mono\GodotSharp\Tools\nupkgs" --name "Redot Packages v4.4-dev"
Remember to remove the package source when moving or uninstalling the Redot engine.
dotnet nuget remove source "Redot Packages v4.4-dev"
If you are using Visual Studio, there is another additional way to manage sources: https://learn.microsoft.com/en-us/nuget/consume-packages/install-use-packages-visual-studio#package-sources
Tested versions
-Reproducible in: Redot mono build
System information
Windows 10 Redot mono build
Issue description
When trying to launch a project with Redot mono build it returns these two errors: Could not resolve SDK "Godot.NET.Sdk". Exactly one of the probing messages below indicates why we could not resolve the SDK. Investigate and resolve that message to correctly specify the SDK. SDK resolver "Microsoft.DotNet.MSBuildWorkloadSdkResolver" returned null. Unable to find package Godot.NET.Sdk with version (= 4.4.0-dev)
Steps to reproduce
1.Open an empty Redot C# project
Minimal reproduction project (MRP)
test.zip