0

When I build and deploy a website with Azure DevOps, it automatically deploys the App_Code folder. I would like this folder not to be deployed, as the website will not load (the website is precompiled).

Currently, each time the website is deployed, I need to manually delete the App_Code folder.

I am assuming it is to do with the MSBuild Arguments, but if I am wrong, let me know. Here are the current arguments:

/p:DeployOnBuild=true
/p:WebPublishMethod=Package
/p:PackageAsSingleFile=true
/p:SkipInvalidConfigurations=true 
/p:PackageLocation="$(build.artifactstagingdirectory)\\"

It would be nice to either have the App_Code folder not deployed, or the website not precompiled.

rhughes
  • 9,257
  • 11
  • 59
  • 87
  • 1
    Did you check this: https://stackoverflow.com/questions/32004423/exclude-folder-when-building-from-vso-to-azure-website – J.K Mar 16 '19 at 22:01

1 Answers1

0

I added the following parameter to the MSBuild Arguments:

/p:ExcludeFoldersFromDeployment="App_Code"

The App_Code is now no longer deployed.

rhughes
  • 9,257
  • 11
  • 59
  • 87