26 Sep
Posted by admin as .NET Programming
Today, I have compiled one of my .NET 2.0 web projects (using Visual Studio 2005) and after I have deployed it on the web server and loaded the index page, the following error occurred:
Could not load file or assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
System.Web.Extensions.dll is the ASP.NET AJAX assembly that needs to be installed in the global assembly cache (GAC) on the web server. The version of the System.Web.Extensions.dll used is specified in the web.config. For my project, the version used is 1.0.61025.0:
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> …</sectionGroup>
Even though the version specified was 1.0.61025.0, the page was trying to load 3.5.0.0 version. After a quick search on Google I found out that Version 3.5.0.0 comes with .NET Framework 3.5.
So what was the relation between my .NET 2.0 project compiled using Visual Studio 2005 and .NET Framework 3.5? Pretty obvious, isn’t it? Several weeks ago I have installed Visual Studio 2008 Beta 2 and implicitly .NET Framework 3.5. On the Visual Studio 2008 Beta 2 download page they say:
IMPORTANT: After the Beta 2 installation has finished, you should run this script to ensure that the installation of .NET Framework 3.5 Beta 2 will not affect the development of ASP.NET AJAX 1.0 applications.
As you can imagine, I did not run the script as I did not planned to develop AJAX applications using Visual Studio 2008. What I did not know was that the instalation of the Visual Studio 2008 was affecting my existing AJAX projects. It seems that somehow when the project is compiled it references the version 3.5.0.0 of the System.Web.Extensions.dll, instead of 1.0.61025.0. The script fixes the problem!
So be careful: when you install Visual Studio 2008 Beta 2 don’t forget to run the script! It is important! ![]()
Related posts:
One Response
KT
November 3rd, 2008 at 1:58 am
1Hi Aroman,
I am receiving the same message, but instead of the Version=3.5.0 not loading, I am getting the Version=1.0.61025.0 not loading. The DLLs are in the GAC and the web.config file contains the correct version number. Do you have any idea to why this is happening?
Thanks,
KT
RSS feed for comments on this post · TrackBack URI
Leave a reply