0

I am developing with VS 2010 a web site project in C# and target framework is: .NET Framework 3.5.

In the warning tab of Visual Studio, I get the following message, while building the project:

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(1360,9):
warning MSB3247: Found conflicts between different versions of the same dependent
assembly. myProject -> C:\...\bin\Debug\myProject.dll

Moreover, while debugging, if I move the breakpoint to a different section, VS asks me which dll version do I want to choose (even if it has the same version):

enter image description here

The project was originally developed with VS 2008 and then imported in VS 2010. At the beginning the .NET target Framework was automatically set to 4.0 and then I set it again to 3.5.

How can I resolve this DLL ambiguity and find which are the specific dlls involved?

Francesco
  • 9,947
  • 7
  • 67
  • 110
  • Clear out `Temporary ASP.NET Files` and try again. – Oded Jan 26 '12 at 09:55
  • The code is built on the server on D: drive and deployed in a specific folder on C: drive (since it is used with another legacy software and it is the only way the web site can work due to business constraints). Each time before deploy the code, I clean Temporary Internet files and then attach VS to w3wp.exe process to debug. – Francesco Jan 26 '12 at 10:07
  • I can't see from your screen shot if the files are in the same location with an identical name or not. Do you have one assembly or tow there? – Oded Jan 26 '12 at 10:08
  • Yes Oded, the URL is exactly the same for both lines. They points to the same DLL "myProject.dll" – Francesco Jan 26 '12 at 13:16
  • Are you compiling it more than once? Are references you have point to specific versions? – Oded Jan 26 '12 at 13:21
  • The whole solution is composed by different web projects (the web project in the specific depends also from some of them). Each time I finish developing a feature I make a Clean + Rebuild solution, then deploy the built code. AS far as I know there are not specific version or referenced DLLs, therefore I was surprised the system sees ambiguity between the same dll, considered as 2 different. – Francesco Jan 26 '12 at 13:39
  • 1
    Which is why I believe you may have a reference somewhere coded to the exact library version (check your .config files). – Oded Jan 26 '12 at 13:42
  • +1 for the hint - This seems the good path: a collegue told me that we have to use two different versions of System.Web.Extensions in our web.config since the legacy software injects and use an older one. We make a redirect from version 1.0 (used by the legacy system) to version 3.5 used by our code for Crystal reports. – Francesco Jan 26 '12 at 15:45

0 Answers0