We have a git repo on Azure DevOps where we are developing a web app using .NET framework 4.6.1 It's a small web API that uses Swagger and runs fine locally with IIS express. We have set up an App Service on Azure to host the website and it works fine to publish from Visual Studio and it works like a charm.
Now, we want to set up proper Continuous Integration (CICD) pipelines using Azure DevOps so that it all builds and publishes on auto.
We have created a pipeline for the Dev branch of the repo with the following Agent job:
- Use NuGet 4.4.1
- NuGet restore
- Build solution (msbuild arguments below)
/p:DeployOnBuild=true /p:DeployDefaultTarget=WebPublish /p:WebPublishMethod=FileSystem /p:DeleteExistingFiles=True /p:publishUrl="$(System.DefaultWorkingDirectory)\WebAppContent"
- Archive (root folder to archive below)
- Publish symbols path
- Publish artifact
And it works well. All is built, archived into a ZIP, and published as an artifact (or so it seems!)
We have then set up a release pipeline that triggers when a new build is available. The agent is connected with the subscription and to the hosting service. (we have other .NET Core applications that deploy fine).
The agent is as follows:
- Azure Web App Deploy - using Azure Web App (Package or folder)
We have no errors! All seems good but there are no changes on the hosting website on Azure. It's like the website is published at the wrong place on it since we receive a warning that the page doesn't exist when we try to access it.
We've tried different solutions with ZIP deploy/Autodetect/Run from package and using Azure App Service Deploy.
What have we missed?