I am attempting to use Hangfire. Here's my problem, when i try to publish to azure the publish fails coz the DLL is being used by another process.
VSMSDeploy] C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\Web\Microsoft.Web.Publishing.targets(4276, 5): error ERROR_FILE_IN_USE: Web deployment task failed. (Web Deploy cannot modify the file 'Takenet.WebApi.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.)
I've used the AppOffline rule which add App_Offline.htm in the root of my webapp. Once the file is there, IIS will takedown the worker process for my app and unload any files in use but the publish still fails looks like the publish is going faster then the shutdown =/
Can anyone help?