Azure Function: Publish fails with message "Web Deploy cannot modify the file on the Destination because it is locked by an external process." : <p>I am developing an Azure Functions Project and when I publish first time, OK.
Then I publish again, this Error appears:</p>

<blockquote>
  <p>Web Deploy cannot modify the file 'FunctionApp5.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:
  <a href="http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE" rel="noreferrer">http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_FILE_IN_USE</a>.</p>
</blockquote>

<p>It only Publishes if I enter Azure portal, and Restart this Azure Function App</p>

<p><a href="https://i.stack.imgur.com/D8OBX.png" rel="noreferrer"><img src="https://i.stack.imgur.com/D8OBX.png" alt="Azure Portal and Visual Studio 2017"></a></p>
