Converting a C ++ project from 4.0 to 3.5 framework

I need to change the target structure of a C ++ project from 4.0 to 3.5. I found this question / answer useful in how to do this: Change a C ++ / CLI project to a different structure than 4.0 with vs2010
I encountered the following problem: I get warnings:

warning MSB3258: The primary reference "path\file.dll" could not 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 "4.0.0.0" than the version "2.0.0.0" in the current target framework 

and the same for System, Version=4.0.0.0 , Microsoft.VisualC, Version=10.0.0.0 , System.Configuration, Version=4.0.0.0 , System.Xml, Version=4.0.0.0 , System.Security, Version=4.0.0.0 and System.Data.SqlXml, Version=4.0.0.0 . This leads to errors in all projects that depend on the file.dll file that cannot be found. I do not know how to fix this. I also have Visual Studio 2008 installed - although this does not seem to bother, and using Platform Toolset v90 makes even a C ++ project not an assembly. Please, help!

+6
source share
1 answer

The Visual C ++ compiler version 16.00 (shipped with Visual Studio 2010) is not able to target any version of the framework other than 4.0.

To target to 3.5, you must use an older (Visual Studio 2008) version of the C ++ compiler, and you cannot use the new features of the C ++ language (for example, preliminary support for C ++ 11).

You can continue to use Visual Studio 2010 by choosing the toolchain v90 platform.

+9
source

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


All Articles