in

ASP.NET Weblogs

This Blog

Syndication

News




NOTE: The opinions expressed here are MY OWN and are not necessarily those of my employer, partners, customers, friends, or family. ALL content presented AS-IS, for entertainment purposes only with ABSOLUTLY NO WARRANTY expressed or implied.

Joe On ASP.NET

Fixing an ASP.NET 2.0 App after upgrading to 3.5

When you first open an ASP.NET 2.0 website in Visual Web Developer / Visual Studio 2008, VS asks you if you want to upgrade the project to 3.5.

35Up-2

As some of you who are using Microsoft AJAX and who say YES to upgrade to 3.5 have noticed, when you go to run your newly upgraded application (which worked fine before the upgrade), you get build errors !!!

35Up-3

The build error complains that it can't load System.Web.Extensions Version 1.0.61025.0

35UpError

That's the OLD version of Web.Extensions (AJAX)  that works with ASP.NET 2.0.

You'll note a number of references in your web.config file to this old version. Since before the 2008 release wave, MS AJAX was loaded via separate assemblies and since it is now "baked in" to ASP.NET, it's hard for the upgrade tool to know that you don't need the referenced version.

UpVer1

So..... In your web.config change all the 1.0.61025.0 version references to 3.5.0.0 (unless you are using some CTP or Futures Version)

 

UpVer35

If you are using the AJAX Control Toolkit there is still a bit of work to do.

You will now get this error on your Toolkit Control instances.

35Up-8

Download the version of the AJAX Control Toolkit that is built for ASP.NET 3.5

Note: There are separate versions for ASP.NET 2.0 projects and ASP.NET 3.5 projects.

If your are running Windows Vista, Right-Click the .zip file, select properties, and "Unblock" the file.

Then unzip the files to the location of your choice.

Make sure the Visual Studio Toolbox Tab that you create for the controls is with the 3.5 version.

Now you need to upgrade your project to use the new tool kit. The easiest way to do this is to let Visual Studio do it for you.

SWITCH TO SOURCE VIEW and drag and drop any Ajax Control Toolkit control into your page.

35Up-9

When you get this dialog SELECT APPLY TO ALL ITEMS and click yes.

Then delete the control you just added.

UpTKVer

Visual Studio will have updated your controls reference and you should now be good to go !

Published Mar 25 2008, 11:22 AM by JoeStagner
Filed under:

Comments

 

DotNetKicks.com said:

You've been kicked (a good thing) - Trackback from DotNetKicks.com

March 25, 2008 11:58 AM
 

Will said:

On VS2008 RTM, when I say YES to the upgrade prompt, I see the web.config file is perfectly upgraded with system.web.extensions 3.5.0.0

(both on web site and wap)

March 26, 2008 3:05 AM

Leave a Comment

(required)  
(optional)
(required)  
Add

About JoeStagner

Joe Stagner is a Senior Program Manager in Microsoft Corporation’s Developer Tools and Platform Group and has been with Microsoft since 2001 focusing on highly scalable and performant web application architectures, multiplatform interoperability and software security. Joe brings 30 years technical and business strategy experience to Microsoft which affords him a unique experiential perspective. [ I am NOT able to respond to PMs - please contact me via www.MisfitGeek.com ]