?
Solved

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

Posted on 2010-11-26
5
Medium Priority
?
2,160 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

777 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