简体   繁体   English

如何为 .NetCore 项目创建安装程序?

[英]How to create Installer for a .NetCore project?

I recently moved my winform project from.NetFramework to.NetCore3.0.我最近将我的 winform 项目从.NetFramework 移到了.NetCore3.0。

My earlier project had WiX installer support for building a nice and clean installer.我早期的项目有 WiX 安装程序支持,用于构建一个漂亮而干净的安装程序。 But, now i don't see any such support for.NetCore3.0.但是,现在我看不到对.NetCore3.0 的任何此类支持。 Also, WiX installer project is no more compatible in VS2019.此外,WiX 安装程序项目在 VS2019 中不再兼容。 Do you have any suggestions?你有什么建议吗?

WiX has an extension for VS2019. WiX 有 VS2019 的扩展 (I contributed it.) (我贡献了。)

When you create a WiX setup project in VS it asks you what version of .NET to use.当您在 VS 中创建 WiX 安装项目时,它会询问您使用哪个版本的 .NET。 This question isn't actually relevant and has no effect on the project generated.这个问题实际上并不相关,对生成的项目没有影响。 It's just part of the VS2019 project template system and isn't hidden.它只是 VS2019 项目模板系统的一部分,并没有隐藏。

I have an FOSS solution called IsWiX that makes creating this type of installer super easy.我有一个名为 IsWiX 的 FOSS 解决方案,它使创建这种类型的安装程序变得超级容易。 You can see how it works by looking at the desktop tutorial found at:您可以通过查看位于以下位置的桌面教程来了解它是如何工作的:

https://www.github.com/iswix-llc/iswix-tutorials https://www.github.com/iswix-llc/iswix-tutorials

The only real difference between .NET Framework and .NET Core is you have a lot more choices in how to build your project. .NET 框架和 .NET 核心之间唯一真正的区别是您在如何构建项目方面有更多选择。 This means you might no longer author an AppSearch/LaunchCondition and/or create a bootstrapper to install .NET Framework.这意味着您可能不再编写 AppSearch/LaunchCondition 和/或创建引导程序来安装 .NET 框架。 You might instead deploy a private copy of the framework with your application or you might create a single self contained executable.您可以改为使用您的应用程序部署框架的私有副本,或者您可以创建一个独立的可执行文件。 You have more choices here.你在这里有更多的选择。 But WiX, IsWiX and MSI still all work great here.但是 WiX、IsWiX 和 MSI 在这里仍然工作得很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM