VS2005 : from beta 1 to beta 2
The last couple of days I've been converting a beta 1 project (ASP.NET) into beta 2 (Visual Studio 2005 Standard Edition). There is no upgrade wizard included in the beta 2 edition, so you have to deal manually with the compile-errors you will encounter.
Here are some compile-errors I had to solve to be able to compile my solution again :
Here are some compile-errors I had to solve to be able to compile my solution again :
- The CompileWith/ClassName attributes in the compilation model are no longer supported. The compilation model has changed in beta 2 with the new CodeFile/Inherits attributes providing a model that is similar to v1.x
The compilation model for ASP.NET 2.0 has changed (breaking change from Beta 1) in Beta 2. It will require you to make small changes to any application built using ASP.NET 2.0 Beta 1. The "compileWith" @Page attribute in beta 1 specified the name of the referenced code-beside file to use. This attribute no longer exists in beta 2 and is now replaced by the "CodeFile" attribute. The ASP.NET Runtime for Visual Studio 2005 still supports codebehind so v1.x web applications can be moved unchanged to Visual Studio 2005 (beta 2). The "ClassName" to "Inherits" change is required.
- 'ASP.xxx_master.FrameworkInitialize()': no suitable method found to override.
This error pops up when compiling my aspx-pages and my masterPages. The code-separation model in Visual Studio 2005 creates 2 classes, even though the code-separation file is defined as a partial class. The "Inherits" class defines a base class and this class is now (beta 2) required to derive from System.Web.UI.Page or System.Web.UI.UserControl for user controls or System.Web.UI.MasterPage for master pages or child class of one of these classes.
- 'xxx_master.yyy(object, System.EventArgs)' is inaccessible due to its protection level.
You must make your private methods (beta 1) 'protected' or 'public' (beta 2) in your code-behind files, so they can be properly accessed in your web-pages.
- Some compilation errors are due to changes to the special directory structure in beta 2. The "Code" directory for example must be renamed to "app_code". Classes that were previously declared in the "Code"-directory must be created now into the "app_code"-directory. More info about these directory naming changes at http://msdn.microsoft.com/asp.net/whidbey/beta2update.aspx.
1 Comments:
At 7:54 PM, Anonymous said…
Pieter, also check Jeff Prosise's blog at Wintellect. He has some issues listed for people moving their sources from Beta 1 to Beta 2:
http://wintellect.com/WEBLOGS/wintellect/archive/2005/05/03/1048.aspx and http://wintellect.com/WEBLOGS/wintellect/archive/2005/05/07/1060.aspx.
David
Post a Comment
<< Home