C
C#•2w ago
Kiel

Help me build a Godot project I cloned from GitHub? (NU1008)

Hi all, I'm trying to build and run this project: https://github.com/ArchercatNEO/Sanicball It's a Godot port of a Unity game, and I'm having trouble building it in the Godot Engine or even just regularly via dotnet build. Here's the Problems tab in Godot 4.4 when I try to build it (image), and the full error:
NU1008: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: GodotSharp;GodotSharpEditor. D:\Code\Sanicball\src\Sanicball\Sanicball.csproj(0,0)
NU1008: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: GodotSharp;GodotSharpEditor. D:\Code\Sanicball\src\Sanicball\Sanicball.csproj(0,0)
I cannot find any PackageReferences in this csproj (or even any csproj I think?) that include a version reference. All the versions are specified in PackageVersion items in Directory.Packages.props. I've never worked with projects using central package management at the solution level like this before, so I'm unsure what the solution is here, or if there is a way to build this project without central package management, by instead specifying the versions on each project??
GitHub
GitHub - ArchercatNEO/Sanicball: My fork of sanicball
My fork of sanicball. Contribute to ArchercatNEO/Sanicball development by creating an account on GitHub.
No description
5 Replies
glhays
glhays•2w ago
Try changing the ProjectReference to PackageReference in the file src/Sanicball/Sanicball.csproj See if that does the job. @Kiel
Kiel
KielOP•2w ago
I have a feeling that won't do it since it's referencing another project in the same solution, but I'll give it a try edit: yeah, didn't change anything. I think it didn't even get to that point in the csproj, as the error is still the same and is referencing something the csproj itself doesn't even reference:
error NU1008: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: GodotSharp;GodotSharpEditor.
error NU1008: Projects that use central package version management should not define the version on the PackageReference items but on the PackageVersion items: GodotSharp;GodotSharpEditor.
Neither of these are referenced by the project 🤔 And the only references to them I can find are in .godot\mono\temp\obj
ero
ero•2w ago
sounds like a question for godot
glhays
glhays•2w ago
Have you tried removing that reference all together as the error is showing duplicate references? Worse can happen it breaks.
Anton
Anton•7d ago
central package management is global for the whole solution you can't reference projects that don't use it from a project that does if you have any package references, you must make them not specify the version like the other projects do there is no way around it this is the main problem with central package management and why people don't generally use it I recommend grouping dependencies in targets files and import groups manually. You can add conditional logic to import them based on a property defined earlier or based on the project name or location in a Directory.Build.targets (this is read after the project file)

Did you find this page helpful?