简体   繁体   English

创建Windows应用商店的问题。 (Windows 8)

[英]Problems creating Windows Store app. (Windows 8)

When i create a new Blank App (XAML) Project in Visual studio i get these errors: 当我在Visual Studio中创建一个新的空白应用程序(XAML)项目时,我得到以下错误:

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 无法解析Windows元数据

So i figured i'll fix the namespace issues. 所以我想我会解决名称空间问题。 This was by adding reference to Window and add namespace Windows.UI.XAML ; 这是通过添加对Window的引用并添加命名空间Windows.UI.XAML ; After that i get over 3000 (3136) errors here is some of them : 之后我得到超过3000(3136)个错误,其中一些是:

  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.ILanguageStatics'. .winmd文件'Windows.winmd'包含类型'Windows.Globalization.ILanguageStatics'。 The use of the Windows namespace is reserved. 保留使用Windows命名空间。
  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.ICalendarFactory'. .winmd文件'Windows.winmd'包含类型'Windows.Globalization.ICalendarFactory'。 The use of the Windows namespace is reserved. 保留使用Windows命名空间。
  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.IGeographicRegion'. .winmd文件'Windows.winmd'包含类型'Windows.Globalization.IGeographicRegion'。 The use of the Windows namespace is reserved. 保留使用Windows命名空间。
  • The .winmd file 'Windows.winmd' contains type 'Windows.Globalization.DayOfWeek'. .winmd文件'Windows.winmd'包含类型'Windows.Globalization.DayOfWeek'。 The use of the Windows namespace is reserved. 保留使用Windows命名空间。
  • etc. 等等

What i've tried so far 到目前为止我尝试过的

  • Repair Visual Studio 修复Visual Studio
  • Repair SDK' 修复SDK'
  • Uninstall/Reinstall the SDK' 卸载/重新安装SDK'

' Windows Software Development Kit (SDK) for Windows 8 适用于Windows 8Windows软件开发工具包(SDK)

I should also add that i've upgraded my Windows 7 to Windows 8. 我还要补充一点,我已将Windows 7升级到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. 我只是用VS 2012 Update 2来解决这个问题。输出中还有一个警告,例如“无法找到'Windows.winmd'文件的实现细节”(我没有保存此文本,所以不要不记得确切的拼写。这个警告​​指向某个项目Debug文件夹中的Windows.winmd。我发现这个文件夹实际上包含了这个文件的副本。显然,VS出于某种原因制作了这个副本。删除后我能够再次建立我的项目。

So, read all warnings before reinstalling SDK, VS or Windows 8 因此,在重新安装SDK,VS或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. 要解决此问题,我找到了Windows引用并将Copy Local更改为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. 虽然,他在Win 7上而不是Win 8.他所做的是重新安装Windows 8 SDK。

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

Might worth an attempt before doing the whole Win 8. 在完成整个Win 8之前,可能值得一试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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