title: Publish console application via command line using specific publish profile
body: <p>I try to build and publish my .NET Core applications on the command line using predefined publish profiles.</p>
  
  <p>For a ASP.NET Core application this (taken from <a href="https://docs.microsoft.com/en-us/aspnet/core/publishing/web-publishing-vs#publish-profiles" rel="nofollow noreferrer">here</a>) works:</p>
  
  <pre><code>dotnet build -c Release /p:DeployOnBuild=true /p:PublishProfile=ReleaseFolder
  </code></pre>
  
  <p>But for a console application (where the publish profile is called <code>FolderProfile</code>, the following does not work:</p>
  
  <pre><code>dotnet build -c Release /p:DeployOnBuild=true /p:PublishProfile=FolderProfile
  </code></pre>
  
  <p>It builds the project but does not publish it.</p>
  
  <p>So how can I publish a console application using a predefined publish profile?</p>