I'm deploying an IIS Web App with IIS Web App Deploy Task in Azure DevOps Release Pipeline. This works good but don't set the correct application pool. I'm trying it with set a Parameter in Parameters.xml or as -setParam to the Task. But this doesn't change anything. The googled Solutions didn't help. How can I manipulate the Application Pool during deployment? Thanks.
EDIT
In reference to this answer I configured the parameters.xml and pipeline like this. (appHostConfig instead of appPoolConfig hadn't changed anything)
parameters.xml
<parameters>
<parameter name="Parameter 1" description="Full site path where you want to install your application (for example, Default Web Site/Application)." defaultValue="Default Web Site/MyApplication" tags="IisApp">
<parameterEntry kind="ProviderPath" scope="iisApp" match="Default\ Web\ Site/MyApplication" />
</parameter>
<parameter name="Parameter 2" description="Enter the name of the application pool." defaultValue="MyAppPool" tags="AppPoolConfig">
<parameterEntry kind="ProviderPath" scope="appPoolConfig" match="MyAppPool" />
</parameter>
<parameter name="IIS Web Application Name" description="Enter the name of the website." defaultValue="MyApplication" tags="IisApp" />
<parameter name="Application Pool" description="Enter the name of the application pool." defaultValue="MyAppPool" tags="AppPoolConfig" />
</parameters>
Set the website in IIS Web App Deploy Task
(results to -setParam:name='IIS Web Application Name',value='Default Web Site/MyApplication'
)
Set the Application Pool parameter in IIS Web App Deploy Task