2016-12-09 10 views
0

私のプロジェクトでは、Azure App Service Deployタスクを使用してwebdeployパッケージをデプロイします。Azure App Service使用中のファイル

[アプリをオフラインにする]オプションがオンになっている場合でも、展開中にファイルが使用中になることがあることに気付きました。

これを修正するにはどうすればよいですか?

これはエラーです:

2016-12-07T15:26:44.8411101Z ##[error]Failed to deploy website. 

2016-12-07T15:26:44.8411101Z ##[error]Error Code: ERROR_FILE_IN_USE 

2016-12-07T15:26:44.8421096Z More Information: Web Deploy cannot modify the file 'Microsoft.CodeAnalysis.CSharp.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. 

答えて

2

このページでhere

を推奨されているように、私は一時的な修正を持っている私が展開する前に、このコマンドを使用してAzureのCLIタスクを作っています

azure webapp stop --resource-group XX --name YY 

(XXはリソースグループ名、YYはウェブアプリケーションサービス)

azure webapp start --resource-group XX --name YY 

そして、それは動作します:次に次に展開した後、このAzureのCLIタスクを実行

AzureのWeb配置タスク

を使用してデプロイを実行します。

2

'Azure App Service Manage 'タスクを使用して、アプリケーションサービスを停止および開始し、ファイルが使用されないようにすることができるようになりました。

enter image description here

関連する問題