dotnet / Nerdbank.GitVersioning

Stamp your assemblies, packages and more with a unique version generated from a single, simple version.json file and include git commit IDs for non-official builds.
https://www.nuget.org/packages/Nerdbank.GitVersioning
MIT License
1.32k stars 165 forks source link

PrivateP2PCaching.proj' could not be found #1030

Closed bkblie closed 5 months ago

bkblie commented 5 months ago

Getting this in my build log The referenced component 'c:\code\myproject\packages\Nerdbank.GitVersioning.3.6.133\build\PrivateP2PCaching.proj' could not be found.

Is there a fix for this?

AArnott commented 5 months ago

Probably ya. Wipe your packages directory and run nuget restore again. The nuget package does define that file at that location, which you can see by downloading the package yourself and unzipping it. So the fact that it's missing on your computer suggests that your package cache was corrupted somehow.

bkblie commented 5 months ago

Removed all refrences to Nerdbank.GitVersioning from solution Deleted my local nuget cache in my profile and solution packages directory Added the Nerdbank.GitVersioning Nuget to one project in my solution and get this error once more. image

image

image

bkblie commented 5 months ago

Looks like this, not sure, https://github.com/dotnet/Nerdbank.GitVersioning/issues/787

reference to this? https://github.com/dotnet/msbuild/issues/6852

AArnott commented 5 months ago

That additional context totally changes how I interpret your original report. I thought you were reporting a build failure, but I now see you're just reporting a Visual Studio UI glyph. That's just Visual Studio misinterpreting an msbuild item. I think I've already done all I can to minimize those issues. You should probably use Report a Problem in VS to get the project system to stop reporting that, since NB.GV isn't doing anything wrong here.

Alternatively, upgrade your projects to SDK style, which switches you to a newer project system in VS that doesn't complain about this.