简体   繁体   English

Visual C#:使用运行时DLL编译

[英]Visual C#: Compile with Runtime DLLs

I'm trying to compile my program in Visual C#. 我正在尝试用Visual C#编译我的程序。 However, the machine I need it to run on (well, I need it to be able to run on any Windows Machine, at least Windows XP) does not have the .NET DLLs installed. 但是,我需要它运行的机器(好吧,我需要它能够在任何Windows机器上运行,至少是Windows XP)没有安装.NET DLL。 I'm new to this, so how can I compile my Visual C# program with the runtime DLLs so that it will run on other machines? 我是新手,所以如何使用运行时DLL编译我的Visual C#程序,以便它可以在其他机器上运行?

There is no way. 不可能。 You need .NET runtime installed prior running any .NET application. 在运行任何.NET应用程序之前,需要安装.NET运行时。

If you use Click-Once deployment, you can set a setting in the installer that the installer should install the .NET framework before running. 如果使用“一次性”部署,则可以在安装程序中设置安装程序中的设置,安装程序应在运行之前安装.NET框架。 If that's not an option (such as target machine has slow/no internet connection) you can install the redistributable version of .NET 如果这不是一个选项(例如目标机器有慢速/没有互联网连接),您可以安装.NET的再发行版本

You can't. 你不能。 .Net programs can only run if the .Net framework / CLR is installed on the target machine. .Net程序只能在目标机器上安装.Net framework / CLR时运行。 There is no pure XCOPY deployment story for this scenario. 此方案没有纯XCOPY部署故事。

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

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