title: MSBuild arguments to generate files
body: <p>notes:
  Visual Studio 2017 solution with an MVC web app and several other projects, not all of which are referenced by the web app project.  Until now Ive been using VS directly to publish to a test server, but I have moved things into VSTS and have a build &amp; release definition setup but not working yet. </p>
  
  <p>What im trying to achieve, is to get my (hosted) VSTS build agent to produce the published files that my (on-prem) release agent can simply copy to its target destination.  So, Im trying to test the MS build step locally from the VS command line so as to get the files produced and note the path they are at.  Maybe Im making this more complicated that it needs to be?</p>
  
  <p>These options will create a single zipped archive and its associated files and place it into the artefact staging dir.  Is there a way to simply publish the files WITHOUT putting them in an archive - and directly into the artefact staging dir?</p>
  
  <blockquote>
    <h2>Visual Studio Build</h2>
    
    <p>MSBuild parameters</p>
  
  <pre><code>/t:My_MVCWeb_Project_Name /p:DeployOnBuild=true 
  /p:WebPublishMethod=FileSystem /p:PackageAsSingleFile=true 
  /p:SkipInvalidConfigurations=true 
  /p:PackageLocation="$(build.artifactstagingdirectory)\\"
  </code></pre>
  </blockquote>
  
  <p>In my release using on-prem agent), 
  I have a "copy files" task, with the destination as the unc path where the IIS app is located.  However, that will just copy over the archive.  So how can I just copy the files as if I was  using a publish profile, straight to the app directory?</p>
  
  <p>[update2 - still getting zip file produced ]</p>
  
  <pre><code>MSBuild my_solution_name /t:"my_project_name" /p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:SkipInvalidConfigurations=true /p:PackageLocation="D:\temp\local-dev-build-dir"
  </code></pre>
  
  <p>[ update 3 ]
  Trying these from the command line as a test, but nothing is generated</p>
  
  <pre><code>msbuild D:\app_dir&gt;MSBuild my_solution_name.sln /t:"my_web_proj_name" /p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:WebPublishMethod=FileSystem /p:publishUrl="D:\temp\app_build_dir\\" 
  /p:DeployDefaultTarget=WebPublish  
  </code></pre>