project-system: Restore stuck & can't build due to missing ProjectRestoreInfo
Since we converted our project (Xenko) to new project system, we often (esp. after switching branches) end up in a broken state.
When trying to build, we end up with something like this in the log:
Error occurred while restoring NuGet packages: System.InvalidOperationException: The operation failed as details for project SiliconStudio.Core.Design.Tests could not be loaded.
at NuGet.PackageManagement.VisualStudio.NetCorePackageReferenceProject.GetPackageSpecsAsync(DependencyGraphCacheContext context)
at NuGet.PackageManagement.DependencyGraphRestoreUtility.<GetSolutionRestoreSpec>d__7.MoveNext()
Build is totally stuck, i.e it stays like this:
1>FastUpToDate: Project information is older than current project version, skipping check. (SiliconStudio.Core)
Error occurred while restoring NuGet packages: The operation failed as details for project SiliconStudio.Core.Design.Tests could not be loaded.
2>FastUpToDate: Project information is older than current project version, skipping check. (Irony)
3>FastUpToDate: Project information is older than current project version, skipping check. (SiliconStudio.ExecServer)
Restarting VS & git clean (.vs) usually doesn’t seem to fix the issue.
I can sometime (but not always) get out of the situation by: (1) Killing all MSBuild process (2) Doing a manual (command-line) nuget restore (maybe this is probably what helps fix it since VS doesn’t need to restore anymore) (3) Sometimes (random magic) git clean and/or VS restart might also be necessary (4) If this doesn’t work, I end up doing a new checkout (takes a while)
It happens quite easily on multiple separate PC and users, so not a local issue.
I investigated little bit and it seems NominateProject
is not called on this specific project.
Not sure if related, but here’s what I noticed when debugging project-system:
- Some NominateRestore calls (but only about 20 of them, out of 100+ projects)
- A big
Microsoft.Build.Exceptions.BuildAbortedException
exception
Could this be the main issue?Exception thrown: 'Microsoft.Build.Exceptions.BuildAbortedException' in Microsoft.Build.dll Build was canceled. A node of the required type InProc could not be created.
- Hundreds of
System.OperationCanceledException
inMicrosoft.VisualStudio.Threading.dll
- A few more NominateRestore (but only for projects that already ran through NominateRestore before).
Sorry for the lack of easy repro, it is quite a big project that we can’t share publicly yet. This happens often and quite hard to get out, so quite a big blocker & slowing us down quite a lot.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 17 (11 by maintainers)
Update: problem “solved” or temporarily quieted. Cleaned
git clean -fdx
repository and haven’t seen the complaint since.A coworker “solved” or temporarily quieted it by rolling back to previous revision of Visual Studio.