I try to deploy my .net core site to Azure via Publish context menu in VS2017 and occasionally (about 1 in 3 deploys), I get the error below.
Web deployment task failed. (Web Deploy cannot modify the file 'MyCoreWebSite.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.)
Then I'll literally wait a minute, try again and it will work. Meanwhile, I'll run the handle utility looking for anything locking the DLL and it never finds anything.
Is this a bug or am I missing something simple?