Fixed: Failed Publish to Production on Azure

For some reason, my deployments to my production service on http://www.inventose.com stopped working. It looked like some automated process had made a change to my deployment scripts, so I deleted them and started over. Then, I ran into this annoying problem….which I had resolved before, but had just deleted the solution:

Error Code: ERROR_FILE_IN_USE More Information: Web Deploy cannot modify the file ‘INV.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. Error count: 1.

This time, I am going to store my solution so that when this happens again, I will know exactly what to do. The solution is actually quite simple:

  • go to your visual studio website (e.g., https://inventose.visualstudio.com/)
  • Navigate to the appropriate project > release
  • Click on the ellipses (…) next to the release definition (on the left side) that controls your failing deployment, and select edit
  • Click on the tasks tab, and select the environment that you are publishing to (probably Production)
  • Click on Deploy Azure App Service
  • There is an option for “Additional Deployment Options” that appears on the settings page for the Deploy Azure App Service. You guessed it: click that!
  • Finally, check the “Take App Offline” checkbox and save your way back home.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s