I just upgraded my site's bits to .NET 2.0. It was deceptively simple. However, when I went to deploy my latest bits to test, things stopped making sense. From a VS.NET 2003 / .NET 1.1 frame of reference, that is.
When I look at the properties of my web site project in VS.NET 2005, I don't see any output information? When I right-click on my site project and click “Build Web Site“ where is my site DLL being built? I don't see anything going into bin...
Let's say you deploy the site the same way you did with VS.NET 03 and .NET 1.1. You will likely get an error like:
Parser Error Message: Could not load type 'blah.Global' or Could not load type '_Default'
As far as I can tell, this is the deal. You have two options: You can compile at runtime only or you can “pre-compile.“ The first option is done by using src=”YourFile.cs” or putting your code “inline” usng the <script runat=server /> tags. Both options for compiling at runtime only are equally stupid, so don't consider either one in a production environment. There are lots of reasons why compiling at runtime only is stupid, but the main one is that if there are problems with your code you want to know before it gets to production.
You can precompile a few ways. You can either use \<windir>\Microsoft.NET\Framework\v2.XXX\aspnet_compiler.exe directly, or you use VS.NET 2005, which in turn will use aspnet_compiler.exe. I am guessing MSBuild also uses aspnet_compiler.exe, but I haven't tried it yet. To precompile using VS.NET, right-click on your site in the Solution Explorer and choose “Publish Web Site.“ You can publish to an FTP site, but when I tried my VS.NET froze solid and I had to use Task Manager to blow it away. Now, I “publish“ to another directory and use Beyond Compare to migrate my changes.
Hopefully this will help clarify what is going on for someone else running into the same issue.