简体   繁体   English

Hot To Auto Install .Net 使用我的安装程序运行我的应用程序

[英]Hot To Auto Install .Net With My Installer To Run My Application

我已经在我的 PC 中使用 C# 创建了一个控制台应用程序,它运行正常,但是当我在客户端 PC 上安装它时,它显示它需要安装 .net 但问题是他们无法访问互联网,所以我如何附加和安装 .net当我的安装程序运行时(.MSI)

In .net 6 you can create a self-contained single executable file by publishing like this:在 .net 6 中,您可以通过像这样发布来创建一个自包含的单个可执行文件:

dotnet publish -p:PublishSingleFile=true -r win-x64 -c Release --self-contained true

See: https://dotnetcoretutorials.com/2021/11/10/single-file-apps-in-net-6/请参阅: https ://dotnetcoretutorials.com/2021/11/10/single-file-apps-in-net-6/

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

相关问题 为什么CASPol允许我的.NET应用程序运行? - Why is CASPol allowing my .NET application to run? 如何为我的 C# 应用程序制作安装程序? - How to make an installer for my C# application? 我的.msi文件安装程序在安装过程中要求关闭当前运行的控制台应用程序或Windows服务 - My .msi file installer during installation ask to close currently run console application or windows service 为什么我的 .NET 6 应用程序需要 .NET 6 SDK 才能运行? - Why does my .NET 6 application require .NET 6 SDK to run? 我的应用程序将以管理员身份运行吗? - Will my application run as administrator? 我的应用程序无法在.net 2.0下运行,只能在3.5上运行 - My application won't run under .net 2.0 , works on 3.5 为什么我的ASP.NET 5应用程序不能在IIS 7.5上运行? - Why does my ASP.NET 5 Application Not Run On IIS 7.5? 如何强制我的 .NET 应用程序以管理员身份运行? - How do I force my .NET application to run as administrator? 试图让我的.net核心应用程序在Visual Studio代码中运行 - Trying to get my .net core application to run in visual studio code 无法在 JetBrains Rider 中构建或运行我的 .NET 应用程序 - Cannot build or run my .NET application in JetBrains Rider
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM