ASP.NET Core: “The project doesn't know how to run the profile Docker.” on Visual Studio 2017

前端 未结 5 1444
夕颜
夕颜 2020-12-18 19:39

I have set up an ASP.Net Core Web application - this application runs Angular using .Net Core 2.2 -> 2.2.0-preview3. After initializin

相关标签:
5条回答
  • 2020-12-18 20:20

    For me, the nuget package "Microsoft.VisualStudio.Azure.Containers.Tools.Targets" hadn't been resolved. After updating it via Manage NuGet Packages, everything workes perfectly.

    0 讨论(0)
  • 2020-12-18 20:20

    I was using VS2019 v16.1.3 and right clicked added an item and selected a Docker File. When clicking the run (Docker) button I encountered this issue. I upgraded to v16.1.5 which also restarted VS2019. Running the application using Docker then worked.

    0 讨论(0)
  • 2020-12-18 20:25

    I had all of the sdks installed, however looking at the supported frameworks I could see that the template used netcore2.2. Even though I had it installed, I still got the error. Seeing as 2.2 has reached EndOfLife, so I changed to 2.1

    No need to delete the DockerFile

    The fix for me was to change the FROM build step from 2.2 to 2.1

    0 讨论(0)
  • 2020-12-18 20:30

    I know its late already, but it worked for me and i hope it helps.

    1 - delete dockerfile present in the project

    2 - then right click on the project > add > Docker support

    3 - choose between widows or linux

    This will recreate the dockerfile and add Microsoft.VisualStudio.Azure.Containers.Tools.Targets to your nugget dependencies. Updates will maybe be required.

    4 - Run and should be just fine

    0 讨论(0)
  • 2020-12-18 20:34

    In my case a full reboot solved the problem.

    0 讨论(0)
提交回复
热议问题