Jason Whitehorn

MarshalByRefObject.net
posts - 50, comments - 26, trackbacks - 6

My Links

News

Archives

Post Categories

.NET

Java

Proud Member Of...

XNA

Visual Studio 2005 and .NET 3.5 Don't Play Well Together

UPDATE (12/17/2007): My blog has moved. This post is now located at: http://jason.whitehorn.ws/2007/06/23/Visual+Studio+2005+And+NET+35+Dont+Play+Well+Together.aspx




As many of you have, I also have experimented with the pre-releases of .NET 3.5 and Visual Studio codenamed Orcas. I, for better or worse, installed this pre-release software on my primary development machine which has Visual Studio 2005.

Despite having .NET 3.5 installed on my machine, my primary development occurred in .NET 2.0 via Visual Studio 2005. I had not experienced any problems with this setup until the other day. While attempting to build and publish an ASP.NET 2.0 website with AJAX extensions, I ran into a cryptic server error when executing the site on a staging server. The error was:

Could not load file or assembly 'System.Web.Extensions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 
or one of its dependencies. The system cannot find the file specified.


The System.Web.Extensions assembly is the ASP.NET AJAX assembly, so at first I simply thought that the staging server did not have AJAX extensions installed. After installing the AJAX extensions, the issue remained unresolved. A quick look in the machine's GAC showed that it had version 1.0.61025.0, which is the latest version. Inspection of my development machine's GAC showed both 1.0.61025.0 and 2.0.0.0 installed.

At this point I was puzzled how my machine had an unofficial version of AJAX extensions, and how my website was referencing it. Next I looked at the web.config of my site to see if I could just change the referenced version to 1.0. However, inspection of the web.config reveled:


<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
</add>



As it turned out, I was already explicitly referencing the correct version. As you can imagine, at this point I was extremely puzzled. I even attempted a few cleans and rebuilds of the site, but to no avail. After some time, I realized that the 2.0.0.0 version of System.Web.Extensions was something that shipped with .NET 3.5, and despite my explicit reference to 1.0.61025.0 Visual Studio 2005 was linking against this other version. The only way to resolve this issue was to uninstall Visual Studio codenamed Orcas and .NET 3.5.

I do not know if the fault lies with Visual Studio 2005, or something with the .NET 3.5 framework. But, whichever component is at fault, I hope that this issue is resolved before the final version of .NET 3.5 ships.

Print | posted on Saturday, June 23, 2007 11:04 PM | Filed Under [ .NET ASP.NET ]

Feedback

Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together

EXACTLY what happened to me...

I'm gonna check if uninstalling the ORCAS version works... thanks
6/29/2007 1:52 AM | Guhan
Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together

I have added to ".net framework configuration->Configured assemblies" a redirect to System.Web.Extensions from 2.0.0.0 to 1.0.61025.0
7/2/2007 7:11 AM | Vera
Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together

Vera,

Thanks for your suggestion. I have written an article summarizing the solution you have proposed. The article can be found at: http://geekswithblogs.net/jwhitehorn/archive/2007/07/03/113660.aspx

Thanks again for your comment,
Jason Whitehorn
7/3/2007 5:36 PM | Jason Whitehorn
Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together

I'm running into this error and I don't think it has anything to do with .Net 3.5. I was able to run the extensions on a machine with 3.5 on it, but ran into a problem after installing the extensions on windows 2003. Made sure the files existed in windows\assembly, restarted IIS, restarted the application pools.......but still running into extensions issue. Did see a document that mentioned copying the system.web.extensions.dll into the bin directory of the application, but my applications don't have a bin directory and the file already exists in the GAC ~ windows\assembly...........
7/26/2007 12:31 PM | Peter
Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together

Peter,

The issue occurs if your source code is compiled on a machine with .NET 3.5 installed, and you try deploying your code to a machine that does not have .NET 3.5.

Perhaps using binding redirection as described in my post at http://geekswithblogs.net/jwhitehorn/archive/2007/07/03/113660.aspx
would work for you.

Let me know if this works, I am interested in hearing if this solution works for you.
7/26/2007 7:34 PM | Jason Whitehorn
Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together


Hi guys,

Please follow the URL given below. Once you are there scroll down to the &quot;Instructions&quot; section, there you'll find an explanation how to resolve this issue.

http://www.microsoft.com/downloads/details.aspx?FamilyID=d2f74873-c796-4e60-91c8-f0ef809b09ee&amp;DisplayLang=en

Cheers!
10/17/2007 3:20 AM | Rasika_G
Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together

Thanks, it fixed all the problems I had since many mounts!!!

12/15/2007 8:58 AM | James
Gravatar

# re: Visual Studio 2005 and .NET 3.5 Don't Play Well Together

I have Vista 64 Ultimate and there were no way to fix the .NetFramework glued with the OS. Thant upgrade did the job all the way!
12/15/2007 9:01 AM | James
Comments have been closed on this topic.

Powered by: