I have an ASP.Net application that performs some database initialization during Application_Start in Global.asax. I\'m using IIS Express to debug the application.
I
You can use a Powershell one-liner to avoid relying on an external app:
powershell -NoProfile -Command (Get-Item "<path>\Web.config").lastwritetime=(Get-Date)
Original inspiration comes from here...
Unfortunately it's not achievable through configuration. I may propose you another trick, but it's up to you to decide whether it's better than yours or not :)
You may create a post-build event which changes the timestamp of a web.config file. I used a touch.exe tool from http://www.stevemiller.net/apps/. You also need to set the "Run the post-build event" to Always. So your "Build Events" configuration may look as follows:
With this option set anytime you start the debugger, web.config timestamp is getting updated causing application restart (application appdomain reload) on the first request - but at this point you are already attached to this process so your Application_
event breakpoints should work.