Solved

"found conflicts between different versions of the same dependent assembly" problem

Posted on 2010-11-26
5
2,099 Views
Last Modified: 2012-05-10
I have a .NET 3.5 solution with one project, building an assembly.

When I build I get the warning:

"found conflicts between different versions of the same dependent assembly"

Running with verbose revealed the following:

    There was a conflict between "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" and "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35".
        "System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was chosen because it was primary and "System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" was not.
    C:\Windows\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets : warning MSB3247: Found conflicts between different versions of the same dependent assembly.

The only way I could get a fix for this was to set the reference to "specific version=true".

Double clicking on the error and accepting the offer to update app.config checks the file out of TFS but doesn't change it and doesn't resolve the problem.

Is there a way to fix this that doesn't require specific version to be set to true?

0
Comment
Question by:purplesoup
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 5

Expert Comment

by:buraksarica
ID: 34217383
Are you using Asp.net ajax library for 2.0? if you migrated your app from 2.0 to 3.5, there is no need to reference the v1.0 of the assembly because .net 3.5 already comes with ajax support.
0
 

Author Comment

by:purplesoup
ID: 34217625
Yes I'm using Ajax, and I can set the version to 3.5, but if I set specific version to false it seem to automatically switch back to 1.0.

I'm guessing perhaps that there is an assembly I am referencing that references 1.0 and that is causing the problem, but it isn't that easy to find out which assembly this is (or there may be more than one).

My point is, is there a way I set specific version to false and not get this message?
0
 
LVL 5

Accepted Solution

by:
buraksarica earned 500 total points
ID: 34217883
yes it's hard to identify, so you can use a tool. Read here : http://ianfnelson.com/blog/msb3247/
0
 

Author Comment

by:purplesoup
ID: 34218586
OK I have installed nDepend and run the query against the code:

SELECT ASSEMBLIES WHERE
DepthOfIsUsing "System.Web.Extensions" >= 0
ORDER BY DepthOfIsUsing

(this apparently means list all the assemblies that are using this assembly directly or indirectly)

The only assembly it says is using System.Web.Extension is my main project.

Looking further at the list of assemblies, I can see there are two versions listed in the references list. One comes from my project reference paths folder, the other from the .NET Framework, by removing my project reference path I find I can reference the 3.5 version without having specific version=true.

Thanks.
0
 

Author Closing Comment

by:purplesoup
ID: 34218590
Thanks for your help.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question