title: .Net Core 2.2 web.config won't transform LAUNCHER_PATH or LAUNCHER_ARGS on publish in Azure DevOps
body: <p>I have a simple API project that I can push to Elastic Beanstalk and run on IIS without trouble. The Web.Config (pretty standard), look like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; 
  &lt;configuration&gt;   
      &lt;system.webServer&gt;
        &lt;handlers&gt;
          &lt;add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" /&gt;
        &lt;/handlers&gt;
        &lt;aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"&gt;
        &lt;/aspNetCore&gt;   
      &lt;/system.webServer&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>When publishing this, the <code>aspNetCore</code> tag gets transformed, with <code>LAUNCHER_PATH</code> &amp; <code>LAUNCHER_ARGS</code> placeholder replaced and <code>hostingModel="InProcess"</code> added (.csproj is set to <code>&lt;AspNetCoreHostingModel&gt;InProcess&lt;/AspNetCoreHostingModel&gt;</code>) to the following:</p>
  
  <pre><code>&lt;aspNetCore processPath="dotnet" arguments=".\xxxxxxxx.Api.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false" hostingModel="InProcess"&gt;
  </code></pre>
  
  <p>I have another project that has the exact same web.config file in it, and it transforms when I manually publish (locally), but does not when it is published via Azure DevOps. The YML in both solutions is the same (and both use <code>CreateDefaultBuilder</code>), but in the second project the web.config doesn't get transformed on publish, it stays with <code>LAUNCHER_PATH</code> and <code>LAUNCHER_ARGS</code> and no <code>hostingModel</code> set.</p>
  
  <pre><code>- task: DotNetCoreCLI@2
    displayName: Publish
    inputs:
      command: publish
      publishWebProjects: False
      arguments: '--configuration $(BuildConfiguration) --output $(build.artifactstagingdirectory)'
      zipAfterPublish: True
  </code></pre>
  
  <p>Note: <code>$(BuildConfiguration)</code> is the same in both projects (Release).</p>
  
  <p>I can hard code the web.config so it doesn't need to transform, but I'd like to know how to solve this properly (especially as we may want to deploy it to linux containers later). I've checked and the .csproj files have the same setup (and package versions), I can't see anything different between the two projects (so I guess I've missed something) besides where web.config lives:</p>
  
  <p>Project that works:</p>
  
  <pre><code>[SolutionDirectory]\[ProjectDirectory]\web.config
  </code></pre>
  
  <p>Project that does not work:</p>
  
  <pre><code>[SolutionDirectory]\src\[ProjectDirectory]\web.config
  </code></pre>
  
  <p>The fact that it works locally, but not in DevOps has me stumped. What could cause publish not to transform web.config?</p>
  
  <p>I should note that the project that does work has <code>projects: '**/*.sln'</code> set in the publish task, however setting this on the other project does not resolve the problem (I looked at the artifact produced).</p>