-
Hello - I downloaded the WinUIGallery sources and attempted to build WinUIGallery.DesktopWap. I'm getting this error:
As near as I understand it, this is some kind of NuGet package error. I attempted to do a "Restore NuGet packages", but that failed. I'm using Visual Studio 2022 17.2.5 on Windows 11. Could you please give some advice here? Thanks very much. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 8 replies
-
Solution found by @rcohn: However, since my last comment, it seems I have found a solution. There were some suggestions in: https://stackoverflow.com/questions/56558843/local-source-of-nuget-packages-doesnt-exist, one of which helped: So now I am able to build WinUIGallery.DesktopWap and publish it. The dotnet restore, by itself, did not work until I did the dotnet new command. For some reason project.assets.json had an empty "targets" field before the nuget commands. Now, "targets" is filled in and targeted to net6.0-windows10.0.18362. Did you install the Windows App SDK extension? I also ran into an issue restoring the packages and installing the extension fixed this issue for me. |
Beta Was this translation helpful? Give feedback.
Solution found by @rcohn:
However, since my last comment, it seems I have found a solution. There were some suggestions in: https://stackoverflow.com/questions/56558843/local-source-of-nuget-packages-doesnt-exist, one of which helped:
dotnet new nugetconfig
followed by:
dotnet restore WinUIGallery.DesktopWap.csproj
So now I am able to build WinUIGallery.DesktopWap and publish it. The dotnet restore, by itself, did not work until I did the dotnet new command. For some reason project.assets.json had an empty "targets" field before the nuget commands. Now, "targets" is filled in and targeted to net6.0-windows10.0.18362.
Did you install the Windows App SDK extension? I also ran into an issue…