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?
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With