English 中文(简体)
AjaxControlToolkit.CalendarExtender and System.Web.Extentions version error
原标题:

I have VS 2005, 2008 on my dev box.

New project from other developers who only have 2005 installed. When I build it I get error.

Error 1 Indirect reference is being made to assembly System.Web.Extensions version 3.5.0.0, which contains AjaxControlToolkit.CalendarExtender . This Project references a prior version of System.Web.Extensions version 1.0.61025.0. To use AjaxControlToolkit.CalendarExtender , you must replace the reference to System.Web.Extensions with version 3.5.0.0 or higher.

When I change the version of Web.Extentions to 3.5 I get another failure

Could not load file or assembly AjaxControlToolkit, Version=1.0.20229.23876, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e or one of its dependencies. The located assembly s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Should I change the Public key for:

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

to the newer one, or is this the wrong thing to do. the Server does NOT have 3.5 runtime.

TIA

问题回答

If your server doesn t have the 3.5 runtime and you aren t able to install it, I suppose you must stick with the 1.0.61025.0 version of System.Web.Extensions.

I would guess that the problem you are encountering is because the AjaxControlToolkit dll that you are using was built with the 3.5 runtime. Thus, your project is referring both to the 1.0.6... version directly and to the 3.5 version through the AjaxControlToolkit reference, and getting confused. You might try downloading the toolkit source and building it from scratch, referencing the 1.0.61025.0 version of System.Web.Extensions. Then make sure to reference this toolkit instead of the default one.

http://ajaxcontroltoolkit.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=11121

Also, you might try making sure that all the references to the System.Web.Extensions DLL version number are consistent, both in your project s references and in the web.config file. Note that if you have a reference selected, you can toggle the "SpecificVersion" property to True in the Properties panel; presumably this makes .NET more picky as to which DLL version it chooses.





相关问题
building .net applications without Visual Studio

I m interested to hear about people working with building .net applications using MSBuild, NAnt or similar tools. What are you using, why are you using it instead of the VS IDE? I like to use ...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Visual Studio 2010 Beta 2: Can I print in color?

I have to turn in a hard copy of some code with an assignment. Is there any way in Visual Studio 2010 to print C# source code with syntax highlighting? PS: The assignment is solving a math problem, ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

WPF design-time context menu

I am trying to create a custom wpf control, I m wondering how I can add some design-time features. I ve googled and can t seem to get to my goal. So here s my simple question, how can I add an entry ...

热门标签