views:

15

answers:

2

Hello

I'm working on a SharePoint web application. Since i can add web parts to the SharePoint pages i added two web parts A & B where A uses Ajax extensions 1.0 and B uses 3.5 version of it.

If i enable Ajax in the web app i get the web.config entries for the both the versions of the dll System.Web.Extensions (1.0.61025.0 & 3.5.0.0) and hence i'm getting an ambiguity error.

How can make the application work with both the versions? I cannot make the versions uniform as the i could have bought the web parts from different vendors.

What is solution for this? How can both the versions of Ajax extensions co-exist?

+1  A: 

unfortunately your question isn't so much related to sharepoint as it is .net.

When you reference a namespace, it looks in the references for assembly paths and erego it doesn't know specifically which one you want. The resolution, ideally is to just use a single name space reference. When that isn't available you're next option is to use a parameterized factory pattern.

Here is an article with some sample code.

How To Use Refactoring To Handle Multiple Versions of Classes.

brian brinley
A: 

Removing entries of 1.0.61025 and adding entries for 3.5.0.0 with a binding redirect to 3.5 will work.

NLV