Q: Does VS2015 Community Update 3 compile Windows UWP Apps for Win10 Build 10586 on Win7SP1?
Asked Answered
V

2

6

I have a PC with Windows 7 SP1 (64bit) that I have been using to build a Windows store app. 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).

When I target the previous release (10586), I get the following error when I try to compile a C# project:


Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2151,5): error APPX0002: Task 'GenerateAppxPackageRecipe' failed. 0x7F - Failed to load MRM support library.


(I have a C++ UWP project in the same solution and it compiles into a DLL without any issues.)

I've tried reinstalling VS2015 Update 2, reinstalling VS2015 Update 3, repairing Visual Studio, repairing the Windows SDK for 10586. None of these worked.

I know the latest Windows 10 SDK does not support Windows 7 SP1; however, does this apply to all previous Windows 10 SDK's?

Venal answered 18/8, 2016 at 17:53 Comment(0)
M
3

Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2151,5): error APPX0002: Task 'GenerateAppxPackageRecipe' failed. 0x7F - Failed to load MRM support library.

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.

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.
  • Addressed issue where MidlRT and MDMerge failed to run on Windows 7
  • Addressed issue where SDK setup failed to install on Windows
  • Addressed issue where deploying a legacy Store app to a 8.1 Phone caused Visual Studio to crash
  • 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.

To solve this problem, please go to Add/Remove Programs and Uninstall Windows Software Development Kit - Windows 10.0.14393.33. Then reinstall the 10.0.14393.795 version from Windows SDK and emulator archive. After this, you should be able to build the UWP app with no error.

However, on Windows 7, with Visual Studio 2015, the official support for Windows Universal is "Build only". A lot of other Visual Studio features are degraded. So if you are developing Windows Universal Apps, Windows 10 is strongly recommended. For more info, please see this answer.

Mansur answered 30/7, 2017 at 11:15 Comment(0)
V
5

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

Step 2: Rename Microsoft.AppxPackage.Targets to something else. I added "-old" after Package.

Step 3: Clean the solution.

Step 4: Confirm you are targeting Windows 10 Build 10586.

Step 5: Build the solution.

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.

Venal answered 22/8, 2016 at 19:40 Comment(2)
While that does allow it to compile, it does not regenerate the Targets file. Is this going to break something else?Orthoptic
Honestly, I don't know if this will break something else.My main PC is a Windows 10 PC. When I'm offsite, I have access to a Windows 7 PC. To keep my development going, I installed VS2015 on the Windows 7 PC so I could write source code and confirm it compiles. I use Git to keep the source code in sync across the two systems.Venal
M
3

Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPackage\Microsoft.AppXPackage.Targets(2151,5): error APPX0002: Task 'GenerateAppxPackageRecipe' failed. 0x7F - Failed to load MRM support library.

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.

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.
  • Addressed issue where MidlRT and MDMerge failed to run on Windows 7
  • Addressed issue where SDK setup failed to install on Windows
  • Addressed issue where deploying a legacy Store app to a 8.1 Phone caused Visual Studio to crash
  • 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.

To solve this problem, please go to Add/Remove Programs and Uninstall Windows Software Development Kit - Windows 10.0.14393.33. Then reinstall the 10.0.14393.795 version from Windows SDK and emulator archive. After this, you should be able to build the UWP app with no error.

However, on Windows 7, with Visual Studio 2015, the official support for Windows Universal is "Build only". A lot of other Visual Studio features are degraded. So if you are developing Windows Universal Apps, Windows 10 is strongly recommended. For more info, please see this answer.

Mansur answered 30/7, 2017 at 11:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.