Solved

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

Posted on 2010-11-26
5
2,031 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
  • 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now