Recently I am trying to upgrade all our projects to .NET 4.5. There is one project in our solution that is written in C++. I am personally not familiar with it, but anyways, it should be trivial I thought.
First thing I notice that after I open the solution, the C++ project has a bracket indication saying this is a “Visual Studio 2010” project. When I try to compile it, it said I need to install VS 2010. Sounds confusing. But, if you open the project’s properties->Configuration Properties->General, look for something call Platform Toolset, you can change it to Visual Studio 2012, this solved the first problem.
When I tried to compile the solution, I got an RC1015 error. Good thing there is a error number I can look up. Here are the 2 solutions I found:
Solution 1
afxres.h is only used for MFC (Microsoft Foundation Class). If your project doesn’t use any UI control from MFC, you should able to replace it with windows.h
Solution 2
Apparently when I install VS2012, I didn’t install the the Microsoft Platform for C++. My guess is that in VS2010, it is installed by default, but in VS2012, this is no longer the case.
References:
http://stackoverflow.com/questions/3566018/cannot-open-include-file-afxres-h-in-vc2010-express