.netwpf.net-6.0windows-storewindows-application-packaging

How to pack a .NET 6 WPF app using Windows Application Packaging Project with Framework-Dependent?


I have a WPF app App1 (.NET 6 with <TargetFramework>net6.0-windows</TargetFramework>) and my client would like to distribute it through MS Store so I created a Windows Application Packaging Project and add reference back to App1. Everything works well and we can publish our app except with just a Hello World project, the package size is more than 60MB (for neutral arch).

I understand it is due to it packing the whole .NET 6 with it. Is there a way to publish it using framework-dependent model instead? We don't mind user being asked to download and install it if they don't have it already installed.


Solution

  • Follow these steps to create a framework-dependent MSIX package: