GurdeepS
GurdeepS

Reputation: 67283

Excluding a folder from release in vsts

I am using azure web apps with VSTS to build and deploy my web app.

All works great but I recently aded an extension to the web app, via Azure, which adds dll's to the site.

Now when I do a deployment, the deployment fails as the files are locked (by deployment, I should say 'Release').

One thing I am wondering, is it possible to exclude the folder from being copied over in the release? There's no need to copy the files anyway, and they're a seperate sub folder to the main dll's.

Thanks!

Upvotes: 0

Views: 619

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33738

You can exclude the folder by specifying ExcludeFoldersFromDeployment property, then the folder will be excluded during deploy/publish to the package, then deploy the package to the azure app service through Azure App Service Deploy task directly.

For example: MSBuild argument of Visual Studio Build task:

/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\\" /p:ExcludeFoldersFromDeployment="[folder path that relative to project file]"

Upvotes: 2

Related Questions