Reputation: 8551
I have a VS 2010 C++/CLI project that I imported into VS 2015. Because it links against some VS 2010 C++ libraries that I don't control, I need it to be compiled with the VS 2010 compiler. When I imported the project to VS 2015, I told VS not to upgrade the project (don't remember the exact options, but the project now says "Project Name (Visual Studio 2010)" in Solution Explorer). In the project properties, the Platform Toolset is listed as "Visual Studio 2010 (v100)":
One of the libraries I'm using has a header with some ifdefs that show an error if _MSC_VER
isn't one of the supported versions (Visual C++ 6.0-10.0). That error is being generated for this project, and I've determined that the _MSC_VER
showing up during build in Intellisense is 1900 (the default for VS 2015).
How do I get the project to build with the 2010 version of the C++ compiler (_MSC_VER
1600)? Isn't that what the Platform Toolset option is supposed to control?
Upvotes: 1
Views: 1229
Reputation: 8551
I misunderstood what was going on in Visual Studio. The build was actually working fine; the error being generated was coming from Intellisense. There's a known bug in Visual Studio where Intellisense doesn't properly reflect the _MSC_VER
specified by the project's selected Platform Toolset. I'll leave the question up in case anyone else runs into this problem.
Upvotes: 2