C#. How to eliminate error when adding ProjectB to references of ProjectA, with these projects having the same references but with different versions

-1

Quesiton: C#. How to eliminate error when adding ProjectB to the references of ProjectA, with these projects having the same references but with different versions??? Let's say both projects have the following structure of references: ProjectA

  • ReferenceX v 1.0
  • ReferenceY v 1.0
  • ReferenceZ v 1.0
  • StockSharp.Logging, Version=4.0.1,

ProjectB

  • ReferenceX v 2.0
  • ReferenceY v 2.0
  • ReferenceZ v 2.0
  • StockSharp.Logging, Version=4.3.16.1,

You can see here that ProjectB is being compiled based on the same references but later version than the references of ProjectA.

My AIM: to compile PojectA , adding ProjectB as the reference:

ProjectA

  • ProjectB
  • ReferenceX v 1.0
  • ReferenceY v 1.0
  • ReferenceZ v 1.0
  • StockSharp.Logging, Version=4.0.1,

The Error i obtain while trying to Build this weird constructions of ProjectA references:

System.IO.FileLoadException: Could not load file or assembly "StockSharp.Logging, Version=4.3.16.1, Culture=neutral, PublicKeyToken=a245fe39d1a4aa84" or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

How i've tried to bypass the error: i've opened ProjectName.csproj and tried to remove the definite version number for each coinsiding references - > No Result

c#
reference
.net-assembly

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0