title: MSBuild - Project-specific targets for solution does not work
body: <p>I have a solution that has multiple projects in it, including a web application. I want MSBuild to execute &quot;WebPublish&quot; target against the web application project and &quot;default target&quot; for all other projects in the solution.</p>
  <p><a href="https://docs.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2015/msbuild/how-to-build-specific-targets-in-solutions-by-using-msbuild-exe?view=vs-2015" rel="nofollow noreferrer">This MSDN article</a> says that I can do it specifying the command line</p>
  <pre><code>msbuild SlnFolders.sln /t:NotInSlnfolder:Rebuild;NewFolder\InSolutionFolder:Clean
  </code></pre>
  <p>But I never could make it work - MSBuild return an error, something like &quot;NotInSlnFolder:Rebuild&quot; target does not exist. It does not matter what target to specify, Build, Rebuild or Clean - it does not work in any case.</p>
  <p>How can I achieve my goal of specifying project-specific targets for a solution?</p>
  <p>The MSDN documentation does not work. Or have I missed something?</p>