Found this trick today and it saved me a lot of pain. I was renaming/reorganizing a bunch of classes and almost every page I went to greeted me with this error:
To make life easier I added an After Build target to my web project to run the asp.net compiler. This will catch all the same errors which would normally require you to go to each page of the site.
Add this to the bottom of your .csproj file:
<Target Name="AfterBuild">
<AspNetCompiler
VirtualPath="temp"
PhysicalPath="$(ProjectDir)..\$(ProjectName)"
/></Target>
0 Responses to “Running the asp.net compiler after build“