ligershark / sidewafflev2

Other
30 stars 11 forks source link

Error occurred while restoring NuGet packages: The operation failed as details for project x could not be loaded #43

Closed Rfaering closed 5 years ago

Rfaering commented 5 years ago

Getting the following error

Error occurred while restoring NuGet packages: The operation failed as details for project x could not be loaded.

After creating empty dotnet projects through template.

This issue is resolved after restarting visual studio.

I get this in VS 15.9.11

image

Also get the following error when I try to edit the csproj file without unloading it

image

sayedihashimi commented 5 years ago

@Rfaering can you give me some steps to reproduce the issue?

Rfaering commented 5 years ago

@sayedihashimi - Thanks for your response, I have created the smallest possible example. That reproduces the error on my visual studio. I have also tried to distribute the package to other machines, that experiences the same error after creating the template

Please let me know, if you need further information to reproduce the error

VsixTest.zip

Rfaering commented 5 years ago

@sayedihashimi - any news?

sayedihashimi commented 5 years ago

@Rfaering sorry for the delay, I've been too tired due to taking care of a newborn. How did you create this project? When I tried it I'm getting a build error:

1>C:\Program Files\dotnet\sdk\2.2.204\Sdks\Microsoft.NET.Sdk\targets\Microsoft.PackageDependencyResolution.targets(208,5): error NETSDK1004: Assets file 'C:\Users\sayedha\source\repos\foobar1\foobar1\foobar1\obj\project.assets.json' not found. Run a NuGet package restore to generate this file.
1>Done building project "foobar1.csproj" -- FAILED.

I tried installing the latest .NET Core 2.2 SDK but that didn't help.

FYI I think I've seen this error message before. I tried to find the issue here but wasn't able to. The error is thrown by VS itself, not SideWaffle.

sayedihashimi commented 5 years ago

@seancpeters does the error message in the dialog mean anything to you? I know I've seen it before but was not able to track it down.

sayedihashimi commented 5 years ago

@Rfaering are you using Azure DevOps? I found this issue https://developercommunity.visualstudio.com/content/problem/398508/value-cannot-be-null-parameter-name-punk-when-chec.html

seancpeters commented 5 years ago

@sayedihashimi - I don't think I've seen this error before.

sayedihashimi commented 5 years ago

@seancpeters thanks

Rfaering commented 5 years ago

@sayedihashimi - I did some more testing today, I had used this guide for inspiration for getting my template to work with multiple projects

https://github.com/ligershark/sidewafflev2/wiki/How-to-Create-A-Multi-Project-Template

Whenever I created core projects, I kept getting the same issue

Playing around with different ideas, I did find a fix, doing the followings.

I do not understand why

image

Thanks for your help, you can close this issue if you want

sayedihashimi commented 5 years ago

Glad you got it working, closing.