From 7ea72f27b8f1d19616b881ee3486aa245774a6be Mon Sep 17 00:00:00 2001 From: Cristei Gabriel-Marian Date: Wed, 4 Dec 2024 23:40:44 -0300 Subject: [PATCH] Correct MakeAppx.exe usage examplef --- Samples/SparsePackages/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Samples/SparsePackages/README.md b/Samples/SparsePackages/README.md index a19aceb..71da1d4 100644 --- a/Samples/SparsePackages/README.md +++ b/Samples/SparsePackages/README.md @@ -26,7 +26,8 @@ A non-packaged WPF app that installs a Signed Sparse Package and uses it to act 3. Add a project reference to the Windows.winmd file at "C:\Program Files (x86)\Windows Kits\10\UnionMetadata\\\Windows.winmd". (Right click PhotoStoreDemo project | Add | Reference| Browse | All files | Windows.winmd) 4. Update the Publisher value in the AppxManifest.xml file and in PhotoStoreDemo.exe.manifest to match the Publisher value in your cert. If you need to create a cert for signing have a look at [Creating an app package signing certificate](https://docs.microsoft.com/en-us/windows/win32/appxpkg/how-to-create-a-package-signing-certificate). 5. Install your cert on the machine -6. Create a Sparse Package by packaging the updated contents of PhotoStoreDemoPkg using [App Packager](https://docs.microsoft.com/en-us/windows/win32/appxpkg/make-appx-package--makeappx-exe-) (MakeAppx.exe) and specifying the **/nv** flag. For example: MakeAppx.exe pack /d \ /p \ mypackage.msix /nv +6. Create a Sparse Package by packaging the updated contents of PhotoStoreDemoPkg using [App Packager](https://docs.microsoft.com/en-us/windows/win32/appxpkg/make-appx-package--makeappx-exe-) (MakeAppx.exe) and specifying the **/nv** flag. For example: MakeAppx.exe pack /d \ /p \\\mypackage.msix /nv + - Note: **mypackage.msix** must be part of the **Output Directory**. 7. Sign the new Sparse Package. See [Signing an app package using SignTool](https://docs.microsoft.com/en-us/windows/win32/appxpkg/how-to-sign-a-package-using-signtool) or you can also use [Device Guard Signing](https://docs.microsoft.com/en-us/microsoft-store/device-guard-signing-portal). 8. In the main method (in Startup.cs) update the value of **externalLocation** to match the output location of your VS Build binaries and the value of **sparsePkgPath** to match the path to your signed Sparse Package (.msix). Note that these values cannot be relative paths and must be complete paths. 9. Build the app @@ -36,4 +37,4 @@ A non-packaged WPF app that installs a Signed Sparse Package and uses it to act ### Removing the package If you need to remove the package from package manager you can run the following command in an admin command prompt: -powershell -c “get-appxpackage -name \*photostore\* | remove-appxpackage" \ No newline at end of file +powershell -c “get-appxpackage -name \*photostore\* | remove-appxpackage"