Beta2 Upgrades For Fun and Profit (posted by Arturo)
Upgrading your existing Whidbey project to Beta 2? Here's a little check list you might find useful.
Rename "Code" folder to "App_Code"
Rename "WebReferences" folder to "App_WebReferences"
Replace "CompilesWith" and or "CodeBehind" with "CodeFile" on all .aspx and .ascx page declarations
Bulk Replace Tip: find "CodeBehind" replace with "CodeFile"
Replace "ClassName" with "Inherits" on all .aspx and .ascx declarations
Bulk Replace Tip: find "ClassName" replace with "Inherits" but watch out for jscript that references the
.className attribute of any HTML elements, make sure you turn on "Match Case"
Need to explictly declare the inherited class for all codebehind classes (*.master.cs, *.ascx.cs, *.aspx.cs).
Pre Beta2 the inheritance was implicit.
Bulk replace Tip: If your pages and controls dont inherit from custom classes you can run a find/replace for
- "_aspx" to "_aspx : System.Web.UI.Page"
- "_ascx" to "_ascx : System.Web.UI.UserControl"
- "_master" to "_master : System.Web.UI.MasterPage"
searching only in .cs files
Need to make all ui element events protected (they arent prefixed by default in the old version making them
ex: void btnSubmit_Click(...)
turns into protected void btnSubmit_Click(...)
Bulk Replace Tip: if you are in the practice of prefixing your UI member variables with their respective type
(i.e. textboxes start with txt, buttons start with btn..), and you've used the default event handler names (i.e
this change is made even simpler by allowing you to bulk replace "void btn" with "protected void btn"
There are some changes that you need to make to your web service proxy class attributes:
- "ConformanceClaims" needs to be "ConformsTo "
- "WsiClaims.BP10" needs to be "WsiProfiles.BasicProfile1_1"
If you have more than one Default page in different directories in your app, you're going to need to uniquely
identify each one
- GroupAdmin/Default.aspx :: GroupAdminDefault_aspx
- DivisionAdmin/Default.aspx :: DivisionAdminDefault_aspx
- Default.aspx :: Default_aspx
Make sure you update the Inherits page directive accordingly.
You might have to go in manually and correct some compilation errors
caused by the bulk find replaces, but its still quicker than making all the changes manually.
Make sure "Match Case" is selected, this will reduce the danger a bit
Build Started.. Build Successful..