Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Samples/SparsePackages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\\<SDK_Version>\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 \<Path to directory with AppxManifest.xml> /p \<Output Path> 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 \<Path to directory with AppxManifest.xml> /p \<Output Path>\\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
Expand All @@ -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"
powershell -c “get-appxpackage -name \*photostore\* | remove-appxpackage"