Reputation: 10851
I'm using Visual Studio 2019 and have added Docker-support for my .NET Core-project. Everything works fine when I'm deploying it, but because of domain-limitations I cannot run Docker locally. Is there any way to run/debug a project without using Docker locally when docker support has been added?
My .csproj looks like this:
<Project Sdk="Microsoft.NET.Sdk;Microsoft.NET.Sdk.Publish">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
</PropertyGroup>
....
And my launchSettings.json:
{
"profiles": {
"SomeProject": {
"commandName": "Project"
},
"Docker": {
"commandName": "Docker"
}
}
}
Upvotes: 7
Views: 3217
Reputation: 1223
Yes, you can! If you select the little debug menu arrow (to the right of the start debugging button shown in the image) you can select whichever debug setup works best for you.
If you have multiple startup projects you'll have to set each one as the sole startup project in turn to access this menu, then set up your multiple startup projects again.
Upvotes: 8