Upgrading your nant deploy to IIS from .Net 2 to .Net 4
Posted by robkraft on April 27, 2010
For a few hours I struggled to figure out how to change my nant build process to specify that my web application should be .Net 4.0 instead of .Net 2.0. We use nant to deploy our web site after we build it using the MKIISDIR tag and executing aspnet_compiler. I made sure we were using the 4.0 version of the aspnet_compiler but the site was still defaulting to 2.0.50727. Finally, as I lay in bed about to fall asleep that night, the solution revealed itself to me. I don’t need to change anything in my nant build process; I just need to change the Default Web Site in IIS on the DeployTo server to be 4.0.30319 instead of 2.0.50727.