Apologies in advance if I've misspelled aspnet_compiler as aspnet_compilter anywhere in this post. For the life of me, I can't figure out why my fingers always want to add that 't'.

Interesting little quirk. Many moons ago, I installed Scott Guthrie et al's Web Application Project, probably because I needed to for dasBlog to compile. Since then, I've kind of ignored it in my project list.

Today I absent-mindedly added one to my solution thinking it was a regular VS2005 Website and I received errors in the build step that used aspnet_compiler to precompile the app: Could not load type 'SampleWebPage.aspx.cs'.

I set up debugging this already knowing in the back of my mind that it probably had something to do with the type of web project it was. My first clue was that when I built the web project in Visual Studio itself, it was compiled using csc:

Whereas the output for a Web Site build is as follows:

The other hint was the property pages. For a Web Application Project, you get property pages that look like they do for a class library or WinForms app:

For a Web Site:

Plus they're called different things in the right-click menu (Properties vs. Property Pages).

Finally, there's the actual error message itself. Web Applications Projects, of course, use an explicit namespace, Web Sites do not. And the big ol' honkin' namespace declaration at the top of the class was a pretty solid indication that this ain't no VS2005 Web Site.

So the choices were pretty obvious: modify the build to accommodate the Web Application Project or use a Web Site. I chose two as the path of least resistance since I had but one (incomplete) page in it.

Kyle the Rebuilt