-1

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.

Justin G
  • 776
  • 1
  • 10
  • 25
  • Not hugely familiar with the Windows namespace but it could be that you have not linked your app to the appropriate libraries? As for the error when opening VS, check out this link: http://stackoverflow.com/questions/12782863/the-error-this-project-is-incompatible-with-the-current-version-of-visual-studi – kingcolumbo Jul 30 '15 at 04:23

1 Answers1

0

Figured it out. This website has all the information needed on what paths you need to add in order to get it to find the windows.winmd file, which is what spawned all of my original issues. Once I followed their steps it fixed all my issues.

Justin G
  • 776
  • 1
  • 10
  • 25