Reputation: 561
We have an Azure Web App that we have Source Control integration setup with Visual Studio Online via the built in Azure functionality. This, of course, creates a build definition in our Visual Studio Online account. We have had this configured and it has worked just fine for deploying our website by queuing a build.
Our ultimate configuration is to actually create a Virtual Application and use the build to deploy to the Virtual Application instead of the web app site root.
So, we created the Virtual Application in the portal. See screenshot:
Our trouble comes in that we can't get the build definition to actually deploy to this virtual application. The build either fails or the files still end up in the site\wwwroot folder.
Our azure web app name is: inyoforum(staging)
We've tried numerous variations of the following MSBuild arguments: /p:DeployIisAppPath="inyoforum__Staging/Forum"
/p:DeployIisAppPath="inyoforum__Staging\Forum"
/p:DeployIisAppPath="inyoforum(staging)/Forum"
/p:DeployIisAppPath="inyoforum(staging)\Forum"
We even tried other variations. We tried using a publish profile instead. We can get a publish from our local Visual Studio application to the virtual application, but we've been unable to do it from the build definition.
Any suggestions on other things to try?
Upvotes: 0
Views: 1957
Reputation: 14373
I had this same problem and found virtual directories are not supported by MSDeploy PowerShell scripts. So I created a custom deployment task to support this use case. Give it try -
Upvotes: 0
Reputation: 29958
You can create a publish profile to publish the website to virtual app and specify the profile in MSBuild Arguments. Steps like following:
Create a new build definition and enter following strings in MSBuild arguments:
/p:DeployOnBuild=true /p:PublishProfile=xxxx.pubxml
You can also install MSDeploy Package Sync task and use it to deploy to virtual app. Please refer to this article for details: CUSTOM DEPLOY TASK TO DEPLOY VIRTUAL APPLICATIONS TO AZURE
Upvotes: 1