[英]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
.我有一个 WPF 应用程序
App1
(带有<TargetFramework>net6.0-windows</TargetFramework>
.NET 6),我的客户想通过 MS Store 分发它,所以我创建了一个Windows Application Packaging Project
并将引用添加回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).一切正常,我们可以发布我们的应用程序,除了一个 Hello World 项目,包大小超过60MB (对于中性架构)。
I understand it is due to it packing the whole .NET 6 with it.我知道这是因为它包含了整个 .NET 6。 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.
如果用户尚未安装它,我们不介意要求用户下载并安装它。
Follow these steps to create a framework-dependent MSIX package:按照以下步骤创建依赖于框架的 MSIX 包:
Properties\PublishProfiles\FolderProfile.pubxml
file that you created in the previous wizardProperties\PublishProfiles\FolderProfile.pubxml
文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.