Is it possible to configure Visual Studio 2012 to automatically create (and delete) the app_offline.htm
file when using ftp as the publishing method?
I tried to create the file by hand and add it to the solution (so it would be uploaded automatically and I could delete it by hand once the publishing process is done).
But because it exists in my solution, every request is redirected to it and I can't debug anything.
Changing the name to app_offline.htm.deactivated
during development and changing it back to app_offline.htm
before publishing doesn't seem like a perfect solution.
If VS12 doesn't support this natively, I would be happy to use any available extension.
Edit: I noticed, that the app_offline.htm
file is created when activating delete all content before publishing
but not when this option isn't selected.
Inserting <EnableMSDeployAppOffline>true</EnableMSDeployAppOffline>
to the .pubxml
file didn't change anything.
From: http://www.asp.net/mvc/tutorials/deployment/visual-studio-web-deployment/deploying-a-code-update
It says: