I sometimes use Casini to debug local web applications. Casini is easy to configure, no need to create a virtual directory, it’s gone after you close Visual Studio so it’s easy.
The problem is that sometimes when changing some code, Casini’s caches aren’t cleared. So you get a stale version of your webpage (or Silverlight or …).
How can we link this to Visual Studio? Easy. Go to your web project and double-click properties:
Then go to Build Events, and enter the following text in the Pre-Build event command line (as shown on the picture):
powershell Stop-Process -name webdev.webserver*
Next time when you rebuild, Casini will be stopped, and you will always start from a clean page 🙂