Debug .Net Core Console App out of Visual Studio 2017

I want to run and debug a .Net Core (2.2) Console application (not ASP.Net Core!).
There for I created a very simple app:

public static class Program
    public static void Main(string[] args)
        WriteLine($"Platform: .NET Core");
        WriteLine($"OS: {RuntimeInformation.OSDescription}");

    private static (string, bool) ParseArgs(string[] args)
        var buffer = new StringBuilder();
        var withColor = false;
        foreach (var s in args)
            if (s == "--with-color")
                withColor = true;
            buffer.Append(" ");

        return (buffer.ToString(), withColor);

Added a Docker file.

Added the Microsoft.VisualStudio.Azure.Containers.Tools.Targets NuGet package.

Finaly changed the launchSettings.json to:

  "profiles": {
    "dotnetapp": {
      "commandName": "Project"
    "Docker": {
      "commandName": "Docker"

So everything looks like in a default ASP.Net Core WebApp with docker support.

But on “run” I only get a error “The profile ‘Docker’ can not be excecuted with this application”.

I don’t get it, whats the difference? How can I run a simple .Net Core App the same way like a .Net Core ASP App?

enter image description here

Source: StackOverflow