简体   繁体   English

问:VS2015社区更新3是否在Win7SP1上为Win10 Build 10586编译Windows UWP应用程序?

[英]Q: Does VS2015 Community Update 3 compile Windows UWP Apps for Win10 Build 10586 on Win7SP1?

I have a PC with Windows 7 SP1 (64bit) that I have been using to build a Windows store app. 我有一台Windows 7 SP1(64位)的PC,我一直用它来构建Windows应用商店。 I've been using Visual Studio 2015 Community Edition Update 2. This worked great until I applied Visual Studio Update 3 and the latest Windows SDK (14393). 我一直在使用Visual Studio 2015社区版更新2.这非常有效,直到我应用Visual Studio Update 3和最新的Windows SDK(14393)。

When I target the previous release (10586), I get the following error when I try to compile a C# project: 当我定位前一个版本(10586)时,我在尝试编译C#项目时收到以下错误:


Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\AppxPackage\\Microsoft.AppXPackage.Targets(2151,5): error APPX0002: Task 'GenerateAppxPackageRecipe' failed. 程序文件(x86)\\ MSBuild \\ Microsoft \\ VisualStudio \\ v14.0 \\ AppxPackage \\ Microsoft.AppXPackage.Targets(2151,5):错误APPX0002:任务'GenerateAppxPackageRecipe'失败。 0x7F - Failed to load MRM support library. 0x7F - 无法加载MRM支持库。


(I have a C++ UWP project in the same solution and it compiles into a DLL without any issues.) (我在同一个解决方案中有一个C ++ UWP项目,它可以编译成一个没有任何问题的DLL。)

I've tried reinstalling VS2015 Update 2, reinstalling VS2015 Update 3, repairing Visual Studio, repairing the Windows SDK for 10586. None of these worked. 我已经尝试重新安装VS2015 Update 2,重新安装VS2015 Update 3,修复Visual Studio,修复10586的Windows SDK。这些都不起作用。

I know the latest Windows 10 SDK does not support Windows 7 SP1; 我知道最新的Windows 10 SDK不支持Windows 7 SP1; however, does this apply to all previous Windows 10 SDK's? 但是,这是否适用于以前的所有 Windows 10 SDK?

Finally, after days of repairing and re-installing, I finally fixed this. 最后,经过几天的修复和重新安装,我终于解决了这个问题。

Step 1: Assuming you installed Visual Studio in the default location, goto the following folder: C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\AppxPackage 步骤1:假设您在默认位置安装了Visual Studio,转到以下文件夹: C:\\ Program Files(x86)\\ MSBuild \\ Microsoft \\ VisualStudio \\ v14.0 \\ AppxPackage

Step 2: Rename Microsoft.AppxPackage.Targets to something else. 第2步:将Microsoft.AppxPackage.Targets重命名为其他内容。 I added "-old" after Package. 我在Package之后添加了“-old”。

Step 3: Clean the solution. 第3步:清洁溶液。

Step 4: Confirm you are targeting Windows 10 Build 10586. 第4步:确认您的目标是Windows 10 Build 10586。

Step 5: Build the solution. 第5步:构建解决方案。

My targets file is dated May 31, 2016 before I even installed Visual Studio 2015. Before I did these steps, I also deleted everything in the bin/Debug folder but I'm not sure if this helped or not. 我的目标文件是在2016年5月31日我安装Visual Studio 2015之前。在我执行这些步骤之前,我还删除了bin / Debug文件夹中的所有内容,但我不确定这是否有帮助。

Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v14.0\\AppxPackage\\Microsoft.AppXPackage.Targets(2151,5): error APPX0002: Task 'GenerateAppxPackageRecipe' failed. 程序文件(x86)\\ MSBuild \\ Microsoft \\ VisualStudio \\ v14.0 \\ AppxPackage \\ Microsoft.AppXPackage.Targets(2151,5):错误APPX0002:任务'GenerateAppxPackageRecipe'失败。 0x7F - Failed to load MRM support library. 0x7F - 无法加载MRM支持库。

This is a known issue in Windows 10 SDK (ver. 10.0.14393.33) which is included in Visual Studio 2015 with Update 3. And it has been fixed in QFE Build 10.0.14393.795 . 这是Windows 10 SDK(版本10.0.14393.33)中的一个已知问题,它包含在Visual Studio 2015和Update 3中。它已在QFE Build 10.0.14393.795中修复

This non-security update includes quality improvements: 此非安全更新包括质量改进:

  • Addressed issue where developers could not build UWP apps on Windows 7 because MRMSupport.dll failed to load. 解决了开发人员无法在Windows 7上构建UWP应用程序的问题,因为MRMSupport.dll无法加载。
  • Addressed issue where MidlRT and MDMerge failed to run on Windows 7 解决了MidlRT和MDMerge无法在Windows 7上运行的问题
  • Addressed issue where SDK setup failed to install on Windows 解决了SDK安装无法在Windows上安装的问题
  • Addressed issue where deploying a legacy Store app to a 8.1 Phone caused Visual Studio to crash 解决了将旧版Store应用程序部署到8.1 Phone会导致Visual Studio崩溃的问题
  • Addressed issue where application data was not preserved across remote debugging sessions when apps were getting un-registered 解决了在应用程序未注册时跨远程调试会话未保留应用程序数据的问题

For more info, please see Windows SDK and emulator archive . 有关详细信息,请参阅Windows SDK和模拟器存档

To solve this problem, please go to Add/Remove Programs and Uninstall Windows Software Development Kit - Windows 10.0.14393.33 . 要解决此问题,请转到“ 添加/删除程序”并卸载Windows软件开发工具包 - Windows 10.0.14393.33 Then reinstall the 10.0.14393.795 version from Windows SDK and emulator archive . 然后从Windows SDK和模拟器存档重新安装10.0.14393.795版本 After this, you should be able to build the UWP app with no error. 在此之后,您应该能够构建UWP应用程序而不会出现错误。

However, on Windows 7, with Visual Studio 2015, the official support for Windows Universal is " Build only ". 但是,在Windows 7上,使用Visual Studio 2015,Windows Universal的官方支持是“ 仅构建 ”。 A lot of other Visual Studio features are degraded. 许多其他Visual Studio功能都降级了。 So if you are developing Windows Universal Apps, Windows 10 is strongly recommended . 因此,如果您正在开发Windows Universal Apps, 强烈建议使用Windows 10 For more info, please see this answer . 有关详细信息,请参阅此答案

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

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