tags:

views:

215

answers:

2

I have a solution that includes several class library's and a website. The solution was built in .net 2.0 Visual Studio 2005, and later converted to .net 3.5 (all class library's and website are targeting 3.5 framework). Before installing the update, the website functioned perfectly. After, a build fails on using System.Web.Extensions; the error message is: "The type of namespace Extensions does not exist in the namespace System.Web (are you missing an assembly reference?)".

I looked in the .net 2.0 framework folder and the System.Web.Extensions .dll was indeed gone. However the C:\Program Files\Reference Assemblies\Microsoft\Framework\v3.5 folder had the .dll. the GAC shows two System.Web.Extensions, the old 1.06 version and the new 3.5 version. I have the web.config rebinding to the new version.

I checked my references, deleted the old one and added a reference to the .3.5 version of System.Web.Extensions. It didn't work, the build failed at the same place.

I then copied the .dll to the bin of my website, and pointed the reference there. that also did not work, the solution did not build, and when I looked at the references, it appeared to not have a reference to the file in the bin folder.

Note: The system has .net 1.1 installed, Visual studio 2003, and 2005.

can anyone point me to what I can do to fix this? I know uninstalling the 3.5 sp1 update will fix it, but I'd rather keep it.

Thank you Deb

A: 
  1. Asp.NET Ajax extension for .NET framework 2.0 is separate thing. Ajax extension is not included in .NET Framework 2.0. you need to install it separately. Hope, it is already installed on your machine.

  2. you should keep old dll, don't upgrade because it requires a lot of changes in the code. I suggest you to keep old dll reference with upgraded project.

  3. Make sure you have referenced the dll correctly OR remove existing references and add referece with old system.web.extension dll.

It will work fine with .NET Framework 3.5.

Edit: 1. First remove new version references from the project
2. Reinstall Ajax extension for .NET Framework 2.0
http://www.microsoft.com/downloads/details.aspx?FamilyID=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&displaylang=en
3. Add reference with old version dll files.
4. Make sure web.config has correct references.

Brij
your right, it DID work fine with 3.5, Until I installed the .net 3.5 sp1 family update KB 959209. the issue is that After this update was installed, a previously buildable working website, stopped working.the issue seems to be that the GAC references the 3.5 version, while visual studio is trying to find the file in the 2.0 folder, instead of the 3.5 folder. I need to know how to get visual studio looking in the right place. and yes, the reference in the website is pointing to the 3.5 file now.
Deb
updated comment
Brij
A: 

Did you check the added assemblies in the web.config? Is System.Web.Extensions 3.5 added?

<compilation debug="true">
    <assemblies>
        <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </assemblies>
</compilation>
Mehdi Golchin
Yes, This Is a fully functioning 3.5 production website. it was the .net 3.5 family update that broke something, and caused the reference to stop working.
Deb