title: WPF Clickonce publish with Microsoft.Net.Sdk
body: <p>I can successfully build a WPF application with the new csproj format using the Sdk="Microsoft.Net.Sdk".</p>
  
  <p>However, it is a bit of a challenge to publish the said app.  The option is definitely not available from the IDE.  But what I find a bit puzzling is that the Publish target doesn't seem to be available when you call msbuild directly.</p>
  
  <p>These are some of the top-level properties I set:</p>
  
  <pre><code>    &lt;Project Sdk="Microsoft.NET.Sdk"&gt;
  &lt;PropertyGroup&gt;
      &lt;TargetFramework&gt;net461&lt;/TargetFramework&gt;
      &lt;LanguageTargets&gt;$(MSBuildExtensionsPath)\$(VisualStudioVersion)\Bin\Microsoft.CSharp.targets&lt;/LanguageTargets&gt;
      &lt;OutputType&gt;WinExe&lt;/OutputType&gt;
      &lt;PlatformTarget&gt;x86&lt;/PlatformTarget&gt;
      &lt;Prefer32Bit&gt;false&lt;/Prefer32Bit&gt;
      &lt;!--&lt;AutoGenerateBindingRedirects&gt;true&lt;/AutoGenerateBindingRedirects&gt;--&gt;
  &lt;/PropertyGroup&gt;&lt;/Project&gt;
  </code></pre>
  
  <p>I also set the typical ones associated with the ClickOnce eg PublishUrl, etc.  What can I do to get at/expose the Publish target the same way the LanguageTarget above enables "CoreBuild" for the other legacy C# build tasks outside Console, Web and plain libraries. </p>
  
  <p><strong>Further Thoughts:</strong></p>
  
  <p>So, it turns out that on further inspection, there is actually a Publish target. But it does a simple folder/xcopy deployment to a subfolder called Publish rather than creating an app.publish folder and doing the ClickOnce thing.</p>
  
  <p>How does one work around this?</p>