Solved

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

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

691 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