Errors / warning after converting VS 2008 (C #) to VS 2010

We have a Visual Studio 2008 solution with 58 projects. One project targets 3.5 runtime, while the other 57 target 3.0. The solution works great in Visual Studio 2008. I open the solution in Visual Studio 2010 and go through the Upgrade project wizard. When prompted, I decline targeting to runtime 4.0 and stick to the currently selected runtime. The conversion completes without error.

When I try to create, I get a large number of the following two warnings:

"The [AssemblyX] main link cannot be resolved because it has an indirect dependency on the .NET Framework assembly " CrystalDecisions.Enterprise.Framework, Version = 11.5.3300.0, Culture = neutral, PublicKeyToken = 692fbea5521e1304 " , which has a higher version" 11.5 .3300.0 "than the version" 10.5.3700.0 "in the current target structure.

C: \ WINDOWS \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets "

and

"The [AssemblyY] primary link cannot be resolved because it has an indirect dependency on the .NET Framework assembly " mscorlib, Version = 4.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089 ", which has a higher version of" 4.0.0.0 " , than the version "2.0.0.0" in the current target structure.

C: \ WINDOWS \ Microsoft.NET \ Framework \ v4.0.30319 \ Microsoft.Common.targets "

I looked at the assembly manifest where this error occurs:

// Metadata version: v4.0.30319 .assembly extern System.Web { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 2:0:0:0 } .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 //***********Why is this targeting the 4.0? } .assembly extern System.Xml { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 2:0:0:0 } .assembly extern [SomeAssembly1] { .ver 1:0:0:0 } .assembly extern [SomeAssembly2] { .publickeytoken = (A7 E6 CA C5 42 3F 9E A9 ) // ....B?.. .ver 3:1:30307:0 } .assembly extern [SomeAssembly3] { .publickeytoken = (A7 E6 CA C5 42 3F 9E A9 ) // ....B?.. .ver 3:1:30307:0 } .assembly extern mscorlib as mscorlib_6 { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 2:0:0:0 } .assembly extern System { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 2:0:0:0 } .assembly extern Relo.Profile.Client { .ver 1:0:0:0 } .assembly extern PRERS.Logging { .publickeytoken = (A7 E6 CA C5 42 3F 9E A9 ) // ....B?.. .ver 3:1:30307:0 } .assembly extern Microsoft.Practices.EnterpriseLibrary.Logging { .publickeytoken = (74 B5 57 D6 49 41 67 26 ) // tWIAg& .ver 3:1:0:0 } 

I looked through the links that SomeAssembly1, SomeAssembly2, SomeAssembly3 (and the whole solution) do, and I can not find anything that is for 4.0.

I searched for solutions / discussions on the Internet, and none of the workarounds I found worked for me.

http://social.msdn.microsoft.com/Forums/en/msbuild/thread/516647ee-dccf-49ee-959a-00b1fc098eeb

http://connect.microsoft.com/VisualStudio/feedback/details/571860/assemblies-targetting-net-3-5-will-not-load-in-applications-also-targetting-net-3-5

http://arstechnica.com/civis/viewtopic.php?f=20&t=1112439

http://connect.microsoft.com/VisualStudio/feedback/details/510467/migrated-project-cant-compile-the-commandline-for-resgen-task-is-to-long

Any help is appreciated. Thanks!

+4
source share
2 answers

58 projects a lot! One of the first things I will try is to remove some of them from the solution. Knowing that you are going to get other errors in relation to the links to the ones you pulled out, but if this error disappears / remains, then you have a better idea of ​​which one is your problem child.

Another approach could be to create a new VS2010 solution and then add projects back one by one. 58 projects will hurt you, I feel for you!

0
source

Source: https://habr.com/ru/post/1369224/


All Articles