Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

azure - azurew website continuous deployment - Web Deploy cannot modify the file 'XXX' on the destination because it is locked by an external process

I'm running into the following error when trying to deploy an azure website via TFS continuous deployment.

I'm using the TfvcContinousDeploymentTemplate.12.xaml build definition template.

Exception Message: Web Deploy cannot modify the file 'Antlr3.Runtime.dll' on the destination because it is locked by an external process. In order to allow the publish operation to succeed, you may need to either restart your application to release the lock, or use the AppOffline rule handler for .Net applications on your next publish attempt. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE. (type DeploymentDetailedException)

I've done what was suggested and added

<EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>

to the publish profile, however it's not putting the app offline as i'm getting the same error.

Here is a view of my build definition where it's set to use the publish profile with the app offline setting.

enter image description here

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You ran into a limitation of Azure and .NET

Recommended is restarting your application. This can be done by changing an environment variable which in turn forces iis to restart.

For example: In the azure dashboard:

Set COR_ENABLE_PROFILING = 0

then deploy and then again

 Set COR_ENABLE_PROFILING = 1

You can find a description of this problem here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...