views:

168

answers:

2

Opening a .Net 2 project in VS2010 it converts the project without any issues BUT when I attempt to build it fails.

The reason is that in VS2005 a reference was added to System.Web.Extensions which is a .Net 3.5 assembly. Now VS2005 never complained at this and quite happily worked but VS2010 is far more strict and won't allow it.

I've tried changing the targeted framework to .Net 3.5 but I get another situation there where the web page is never displayed, it simply hangs not even getting to Applicatin_OnStart.

Any help either on adding the reference with .Net 2 as target framework (prefered option for time) or getting the .Net 3.5 version to work would be greatly appreciated.

[Edit]

Ok so maybe the reference was a read herring. One of my colleagues opened the project and did the conversion and once he changed the targetted framework to .Net 3.5 it all worked. The difference between our machines is that he's on 32 bit XP and I'm on 64 bit Windows 7. When I change the targetted version and try to run the program the build seems to stop at CppCodeProvider and hang.

[Edit]

A: 

Check your web.config file for the references to System.Web.Extensions. It could be there are duplicate entries or entries pointing to older versions.

Dillie-O
A: 

Check if the project is just targeting the client profile. The following link could provide you additional information: http://stackoverflow.com/questions/1987733/system-web-extensions-assembly-cannot-be-resolved

Black Frog