Solution
You are experiencing this error due to mismatches between the Visual Studio compile chain used to compile your version of MFC and the current Visual Studio compiler.
Visual C++ MFC 11 is the last version released with Measurment Studio and can be found
here . It is compiled with the Visual Studio 2012 Platform Toolset, so your project has to be compiled with a matching toolset.
Note: You have to have the Microsoft Visual Studio 2012 SDK Installed to be able to reference the toolset.
To change the project toolset:
- From Solution Explorer in Visual Studio, right click on your application (not your solution) to bring up the shortcut menu, then select Properties to open the Property Pages dialog box.
- In the Property Pages dialog box, click on the Configuration drop-down list and select All Configurations.
- In the left pane, expand Configuration Properties, then select General.
- In the right pane, select Platform Toolset, then select the toolset you want from the drop-down list. If you have MFC 11 installed, select Visual Studio 2012.
- Click on the OK button.
The screenshot below shows an example of the properties page for Visual Studio 2013: