Simple BLAZOR app causing error with DOCKER - Stack Overflow

I have a created a very, very simple BLAZOR app for testing purposes. Its Visual Studio 2022 with .Net9

I have a created a very, very simple BLAZOR app for testing purposes. Its Visual Studio 2022 with .Net9.0. With ADD> "Docker support" I let Visual Studio 2022 create the DOCKER file. When I try to run it, I get: "The project doesn't know how to run the profile with name 'Container [Dockerfile] and command 'Docker'". My first guess was that DOCKER extension is not added. Hence I went to EXTENSIONS > BROWSE and searched DOCKER. This resulted in some "random" results like "Captain Docker", which I installed. The result is the same though. I had DOCKER Desktop running while I was doing all these. In Windows 10, I have WSL2. Please help.

I have a created a very, very simple BLAZOR app for testing purposes. Its Visual Studio 2022 with .Net9.0. With ADD> "Docker support" I let Visual Studio 2022 create the DOCKER file. When I try to run it, I get: "The project doesn't know how to run the profile with name 'Container [Dockerfile] and command 'Docker'". My first guess was that DOCKER extension is not added. Hence I went to EXTENSIONS > BROWSE and searched DOCKER. This resulted in some "random" results like "Captain Docker", which I installed. The result is the same though. I had DOCKER Desktop running while I was doing all these. In Windows 10, I have WSL2. Please help.

Share Improve this question asked Mar 27 at 6:33 user676987user676987 711 gold badge2 silver badges10 bronze badges 1
  • In the Terminal I am also seeing: "Unable to find package Microsoft.VisualStudio.Azure.Containers.Tools.Targets. No packages exist with this id in source(s): C:\Program Files\dotnet\library-packs, Microsoft Visual Studio Offline Packages" – user676987 Commented Mar 27 at 6:55
Add a comment  | 

1 Answer 1

Reset to default 0

I found the answer to this in: https://learn.microsoft/en-us/answers/questions/1343108/nuget-error-nu1101. Follow the answer provided by: Tianyu Sun-MSFT. The origin of the problem comes from "NuGet Error NU1101". The solution states: you need to add another valid package source for VS to find the specific packages.

Please click Tools > NuGet Package Manager > Package Manager Settings > Package Sources > check if nuget. package source has been added. If it hasn’t been added, please click the “Add” button on top right corner > change the Name to nuget. and the Source to https://api.nuget./v3/index.json > click Update > click OK, then rebuild your project.

Thank you all.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744108347a4558832.html

相关推荐

  • Simple BLAZOR app causing error with DOCKER - Stack Overflow

    I have a created a very, very simple BLAZOR app for testing purposes. Its Visual Studio 2022 with .Net9

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信