So I have two problems. The first is that there is some code that has a lot of using
statements for things in the Windows
namespace like this:
using namespace Windows::System;
using namespace Windows::Storage;
using namespace Windows::ApplicationModel;
For some reason this is causing a ton of compiler errors like this:
error C2039: 'System' : is not a member of 'Windows'
error C2871: 'System' : a namespace with this name does not exist
error C2039: 'Storage' : is not a member of 'Windows'
error C2871: 'Storage' : a namespace with this name does not exist
error C2039: 'ApplicationModel' : is not a member of 'Windows'
error C2871: 'ApplicationModel' : a namespace with this name does not exist
error C3083: 'ApplicationModel': the symbol to the left of a '::' must be a type
I found a fix for this problem by setting the "Windows Store App Support" property of the project to true. This is really strange that I need to do this since it's not a windows store application, but it's the only thing I've found to fix the compiler errors.
The second problem is that when I restart visual studio it fails to load the project with the error message: "Project is incompatible with the current edition of Visual Studio". I'm not sure if this is a bug in Visual Studio 2012 or what, but it seems very odd to me that it lets you set this option if it's going to make the project incompatible the next time you open it.
If there's an alternative solution to fixing the compiler errors that doesn't involve turning on the store app property then that would be the preferred solution, but I'm up for anything at this point.