GET /blog/help-vsts-failed-to-deploy-website.md text/markdown back to the human version
---
title:        "Help: VSTS failed to deploy website (ERROR_FILE_IN_USE)"
description:  "After several succesful deployments, out of nowhere the release starts to fail with the error: Failed to deploy website and error code: ERROR_FILE_IN_USE."
url:          https://www.jeroenfurst.nl/blog/help-vsts-failed-to-deploy-website
date:         2017-03-06
category:     CI/CD and deployment
tags:         [CI/CD and deployment]
reading_time: 1
---

# Help: VSTS failed to deploy website (ERROR_FILE_IN_USE)

> After several succesful deployments, out of nowhere the release starts to fail with the error: Failed to deploy website and error code: ERROR_FILE_IN_USE.

This error originated by enabling the "Remove additional files at destination" option in the Azure App Service Deploy step:
 
 ![Additional Deployment Options](~/getContentAsset/eef5dfb0-0598-495c-b6a0-12bd6a9e590e/310c1ea5-13ca-4d75-95a0-620f51989b44/azure-app-service-deploy-additional-options.PNG.PNG?lang=en-US)
 
 In my setup, I deployed [Kentico](http://www.kentico.com) (all-in-one ASP.NET CMS) which generates a 51 degrees file within the App\_Data folder. During some deployments, the file was locked and could therefor not be removed.
 
 The way I handled it is too exclude (skip) the folder by passing it as additional argument:
 
 *-skip:skipAction='Delete',objectName='dirPath',absolutePath='.\*\\\\App\_Data\\\\51Degrees$'
 
 ![Exclude folder via skip action](~/getContentAsset/bbabb0c1-36fd-4656-8047-634a0809b0fe/310c1ea5-13ca-4d75-95a0-620f51989b44/azure-app-service-deploy-additional-options-skipaction.PNG.PNG?lang=en-US)*
 Alternatively you can bypass the 51 degrees detection entirely using the following application setting: *<add key="CMSEnable51D" value="false" />*
 
 While there might be better alternative solutions, I am pretty happy with the fix :)
 
 Hope this helps!