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

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


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.