I’m using VS.NET 2005 Beta 1, and I’m converting an existing web project to Whidbey format. The wizard pulled all my supporting code files (.cs) to the Code directory, but it left my code-behind files next to their aspx and ascx files. I learned that Web apps – called web sites in Whidbey – cannot be explicitly compiled as in VS.NET 2003. Meaning, I can’t put a Class1.cs in the root and have it compiled into the bin on Build. I have to either put this class in the Code directory or have it in a supporting class library project that I reference from the web site.
It appears that only code files in the Code directory get compiled on a Build, and the (legacy) code-behind files do not get compiled. Then on run, the page errors out because it cannot find it’s code-behind class from which to inherit.
Code-beside, however, does get compiled no matter where it is. The partial class linked through the CompileWith attribute gets compiled along with the aspx page.
So it seems that code-behind is really NOT supported in Whidbey. Am I doing something wrong? Is anyone else using Code-behind in Whidbey? or trying to.