Issue with installing a bundle with resource package

%3CLINGO-SUB%20id%3D%22lingo-sub-356270%22%20slang%3D%22en-US%22%3EIssue%20with%20installing%20a%20bundle%20with%20resource%20package%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356270%22%20slang%3D%22en-US%22%3E%3CP%3EI%20created%20a%20bundle%20using%20packaging%20layout%20as%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fpackaging%2Fpackaging-layout%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Edescribed%20here%3C%2FA%3E%2C%20and%20used%20self-signed%20certificate%20to%20sign%20the%20appx%20and%20appxbundle.%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20my%20packaging%20layout%2C%20I%20have%204%20packages%20(1%20main%2C%201%20asset%2C%202%20resource).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%2C%20when%20I%20try%20to%20install%20the%20generated%20appxbundle%2C%20I%20see%20this%20error%20(also%20attached%20a%20screenshot%20below)%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%22App%20installation%20failed%20with%20error%20message%3A%20Merge%20failure%20for%20shared%20merged%20PRI%20file%20%3A%20error%200x80070002%20%3A%20Cannot%20register%20the%20MySuite.MyApp_1.0.0.0_x64__cw6ywnn9zbvyp%20package%20because%20there%20was%20a%20merge%20failure%20with%20the%20following%20file%3A%20C%3A%5CProgram%20Files%5CWindowsApps%5CMySuite.MyApp_1.0.0.0_x64__cw6ywnn9zbvyp%5Cresources.pri%20(0x80070002)%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20I%20remove%20the%20resource%20packages%20from%20the%20layout%2C%20the%20error%20is%20not%20seen%2C%20so%20it%20seems%20like%20the%20error%20is%20due%20to%20the%20resource%20packages.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EVersion%20of%20MakeAppx%20used%3A%2010.0.17763.132%3C%2FP%3E%3CP%3EOS%20Version%3A%20Windows%2010%20version%201809%20(OS%20Build%2017763.316)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20guide%20what%20am%20I%20doing%20wrong%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ResourcePackageError.PNG%22%20style%3D%22width%3A%20713px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F84268i54147ABE99BA6716%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22ResourcePackageError.PNG%22%20alt%3D%22ResourcePackageError.PNG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-356458%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20installing%20a%20bundle%20with%20resource%20package%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-356458%22%20slang%3D%22en-US%22%3E%3CP%3EIf%20you%20are%20using%20resource%20packages%20then%20you%20need%20to%20have%20the%20appropriate%20resources.pri%20files%20for%20your%20resource%20packages%20(and%20your%20main%20package)%3B%20the%20error%20you're%20seeing%20is%20from%20a%20problem%20with%20your%20pri%20files.%20The%20packaging%20layout%20won't%20create%20or%20validate%20your%20resources.pri%20files%2C%20so%20you%20should%20either%20use%20Visual%20Studio%20to%20build%20your%20initial%20package%20first%20to%20get%20your%20resource.pri%20files%20or%20create%20them%20manually%20with%20makepri.exe%20(%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fapp-resources%2Fcompile-resources-manually-with-makepri%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fuwp%2Fapp-resources%2Fcompile-resources-manually-with-makepri%3C%2FA%3E).%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I created a bundle using packaging layout as described here, and used self-signed certificate to sign the appx and appxbundle. 

In my packaging layout, I have 4 packages (1 main, 1 asset, 2 resource).

 

Now, when I try to install the generated appxbundle, I see this error (also attached a screenshot below): 

"App installation failed with error message: Merge failure for shared merged PRI file : error 0x80070002 : Cannot register the MySuite.MyApp_1.0.0.0_x64__cw6ywnn9zbvyp package because there was a merge failure with the following file: C:\Program Files\WindowsApps\MySuite.MyApp_1.0.0.0_x64__cw6ywnn9zbvyp\resources.pri (0x80070002)"

 

If I remove the resource packages from the layout, the error is not seen, so it seems like the error is due to the resource packages.

 

Version of MakeAppx used: 10.0.17763.132

OS Version: Windows 10 version 1809 (OS Build 17763.316)

 

Please guide what am I doing wrong?

 

ResourcePackageError.PNG

1 Reply

If you are using resource packages then you need to have the appropriate resources.pri files for your resource packages (and your main package); the error you're seeing is from a problem with your pri files. The packaging layout won't create or validate your resources.pri files, so you should either use Visual Studio to build your initial package first to get your resource.pri files or create them manually with makepri.exe (https://docs.microsoft.com/en-us/windows/uwp/app-resources/compile-resources-manually-with-makepri).