Ryan Rinaldi

.net development served with a slice of sarcasm
  • rss
  • About Me
  • Blog
  • Contact

Running the asp.net compiler after build

Ryan Rinaldi 2/25/2009 11:45:41 PM

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:

image

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>
Comments
No Comments
Tags
blog

Leave a Comment

  • My Tweets

    • Looking at our options to move to TFS 2010 from 08 and change process template: just as painful to migrate off of TFS. sigh.
    • RT @Snywhip: I'm very proud of Spain and it's banning of the bull fights starting in 2012. Finally ;)
    • RT @adamtybor: @sergiopereira happy birthday!
    • Follow Me on Twitter
Powered by Graffiti CMS
  • Content © Ryan Rinaldi 2010
  • design by jide
  • Theme converted to GraffitiCMS by Adonis Bitar