简体   繁体   中英

Problems creating Windows Store app. (Windows 8)

When i create a new Blank App (XAML) Project in Visual studio i get these errors:

Starts of with some references are incorrect. Should it really be like this in a new solution? (havn't written anything yet) If i try to build at this Point i get :

Cannot resolve Windows Metadata

So i figured i'll fix the namespace issues. This was by adding reference to Window and add namespace Windows.UI.XAML ; After that i get over 3000 (3136) errors here is some of them :

  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.ILanguageStatics'. The use of the Windows namespace is reserved.
  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.ICalendarFactory'. The use of the Windows namespace is reserved.
  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.IGeographicRegion'. The use of the Windows namespace is reserved.
  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.DayOfWeek'. The use of the Windows namespace is reserved.
  • etc.

What i've tried so far

  • Repair Visual Studio
  • Repair SDK'
  • Uninstall/Reinstall the SDK'

' Windows Software Development Kit (SDK) for Windows 8

I should also add that i've upgraded my Windows 7 to Windows 8.

Anyone has any suggestions about how to solve this issue?

I just hit against this issue with VS 2012 Update 2. There were one more warning in the output, something like "can't find implementation details for the 'Windows.winmd' file" (I didn't save this text, so don't remember exact spelling. This warning pointed to the Windows.winmd in some project Debug folder. I found that this folder actually contained the copy of this file. Apparently, VS made this copy for some reason. After removing it I was able to build my projects again.

So, read all warnings before reinstalling SDK, VS or Windows 8

I had a common portable project being shared across a number of ports. To fix the issue I located the Windows reference and changed Copy Local to False. Has been fine since.

A co-worker had a similar problem with his references. Although, he was on Win 7 and not Win 8. What he did was reinstall the Windows 8 SDK.

http://msdn.microsoft.com/en-us/windows/hardware/hh852363.aspx

Might worth an attempt before doing the whole Win 8.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM