title: .NET 5.0 Web Deploy Package advanced configurations are ignored
body: <p>I would like to publish a Blazor Server App targeting .NET 5.0 from command line, using a Visual Studio publish profile that I created choosing &quot;Web Deploy Package&quot; from Publish wizard.</p>
  <p>First step, I modified the resulting .pubxml file by setting PackageAsSingleFile=false to avoid creating a single .zip file:</p>
  <pre><code>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;    
      &lt;Project ToolsVersion=&quot;4.0&quot; xmlns=&quot;http://schemas.microsoft.com/developer/msbuild/2003&quot;&gt;
        &lt;PropertyGroup&gt;
          &lt;WebPublishMethod&gt;Package&lt;/WebPublishMethod&gt;
          &lt;LastUsedBuildConfiguration&gt;Release&lt;/LastUsedBuildConfiguration&gt;
          &lt;LastUsedPlatform&gt;Any CPU&lt;/LastUsedPlatform&gt;
          &lt;SiteUrlToLaunchAfterPublish /&gt;
          &lt;LaunchSiteAfterPublish&gt;False&lt;/LaunchSiteAfterPublish&gt;
          &lt;ExcludeApp_Data&gt;False&lt;/ExcludeApp_Data&gt;
          &lt;ProjectGuid&gt;5b8f7f32-13f8-4523-ac2d-a8004ba24ecb&lt;/ProjectGuid&gt;
          &lt;DesktopBuildPackageLocation&gt;C:\publish\installer\&lt;/DesktopBuildPackageLocation&gt;
          &lt;PackageAsSingleFile&gt;false&lt;/PackageAsSingleFile&gt;
          &lt;DeployIisAppPath&gt;Default Web Site/MyService&lt;/DeployIisAppPath&gt;
        &lt;/PropertyGroup&gt;
      &lt;/Project&gt;
  </code></pre>
  <p>I then launched Publish with Visual Studio, but the publish completed with this message in Output:</p>
  <pre><code>Package &quot;Basket.Service.zip&quot; is successfully created *as single file* at the following location
  </code></pre>
  <p>First step, failed: i would like to generate an archive folder instead of a single .zip file. The property PackageAsSingleFile is getting ignored by Visual Studio.</p>
  <p>As I've always done with older ASP.NET 4.5 projects, I then customized the .pubxml file to:</p>
  <ul>
  <li>fix the path in the generated package, as suggested in <a href="http://sedodream.com/2015/02/20/VisualStudioWebPackagesFixingThePathInTheGeneratedWebPackage.aspx" rel="nofollow noreferrer">this</a> article from Sayed Ibrahim Hashimi (<a href="https://stackoverflow.com/users/105999/sayed-ibrahim-hashimi">profile</a>).</li>
  <li>create a custom Logs folder and avoid deleting its content if already exists (MsDeploySkipRules attached to AfterAddIisSettingAndFileContentsToSourceManifest).</li>
  </ul>
  <p>I tried calling the publish profile from a custom MSBuild script:</p>
  <pre><code>&lt;MSBuild Projects=&quot;$(SourceDir)\MyService\MyService.csproj&quot;
    Properties=&quot;Configuration=$(BuildConfiguration);DeployOnBuild=true;VisualStudioVersion=16.0;
    PublishProfile=Publish to package;
    DesktopBuildPackageLocation=$(InstallerDir);PackageAsSingleFile=false;
    DeployIisAppPath=Default Web Site/MyService&quot;
    ContinueOnError=&quot;false&quot; /&gt;
  </code></pre>
  <p>or from a single &quot;dotnet publish&quot; command:</p>
  <pre><code>dotnet publish &quot;C:\Source\Middleware\basket\source\Basket.Service\Basket.Service.csproj&quot;  -p:PublishProfile=&quot;Publish to package&quot;
  </code></pre>
  <p>The result is, unfortunately, the same and all the advanced configurations are simply ignored. It seems that every suggestion that I can find about analog problems doesn't do the trick, when applied to .NET Core.</p>