简体   繁体   English

在另一台计算机上运行我的项目(windows 窗体)c#

[英]run my project(windows forms) c# in a different computer

Is there any way that i can make my project (with multiple forms using IO,OLEDB etc.) work on a computer that hasn't installed any C# software on it?有什么方法可以使我的项目(使用 IO、OLEDB 等的多种形式)在没有安装任何 C# 软件的计算机上工作?

I need to make my project run from an EXE file.我需要让我的项目从 EXE 文件运行。 I know I have an exe file in Project/bin/release/Debug and it runs on a computer with C# express software installed in it.我知道我在Project/bin/release/Debug中有一个 exe 文件,它在安装了 C# express 软件的计算机上运行。

How can I export my project to a client computer?如何将我的项目导出到客户端计算机?

In addition, is there any public and free products for installation (for tasks such as locating files and folders)?此外,是否有任何公共和免费产品可供安装(用于定位文件和文件夹等任务)?

Yes, of course!是的当然!

In most cases you should be able to simply copying your executable (found in that bin directory) to the target machine.在大多数情况下,您应该能够简单地将可执行文件(在该bin目录中找到)复制到目标机器。 There may also be a couple of other required / useful files in that folder that you might also want to copy (such as a.exe.config or.pdb file, or possibly even a.dll file if your program is split over multiple projects).该文件夹中可能还有一些您可能还想复制的其他必需/有用文件(例如 .exe.config 或 .pdb 文件,如果您的程序拆分为多个项目,甚至可能是 .dll 文件). If in doubt copying everything will probably work - at worst some of those files are just unneccessary (such as the.vshost files).如果有疑问,复制所有内容可能会起作用 - 最坏的情况是其中一些文件只是不必要的(例如 .vshost 文件)。

Your target machine will need to have the the.Net framework for the version that you are targetting (eg 2.0, 3.5, 4.0 etc...) installed.您的目标机器将需要为您的目标版本(例如 2.0、3.5、4.0 等)安装 the.Net 框架。 In many cases this will already be installed (especially so in the case of.Net 2.0), in the case that it isn't then generally these can be installed through Windows update, alternatively a quick search for ".Net version X installer" should do the trick.在许多情况下,这将已经安装(尤其是在 .Net 2.0 的情况下),如果没有安装,则通常可以通过 Windows 更新安装,或者快速搜索“.Net 版本 X 安装程序”应该做的伎俩。 You should get a reasonably straightforward error messages if you try and run your application on machine that doesn't have the required.Net framework version installed.如果您尝试在未安装所需 .Net 框架版本的计算机上运行您的应用程序,您应该会收到相当简单的错误消息。

If you feel up to it then are extra things that you might want to do when distributing software to a client, such as如果您愿意,那么在向客户分发软件时可能还需要做一些额外的事情,例如

  • Building in Release mode在发布模式下构建
  • Creating an instaler创建安装程序
  • Deploying using ClickOnce使用ClickOnce进行部署

However the above should get you started.但是,以上内容应该可以帮助您入门。

You can right click the project's node to publish it then install it in other machines.您可以右键单击该项目的节点将其发布,然后将其安装在其他机器上。 See clickonceclickonce

You just have to install.Net Framework on the target computer.您只需在目标计算机上安装 .Net Framework。

You always need to install the .NET framework in the client PC.您始终需要在客户端 PC 中安装 .NET 框架。

In the below it is exampled how to create a setup package.下面举例说明如何创建安装包。

Make an Installation program for C# applications and include .NET Framework installer into the setup 为 C# 应用程序制作一个安装程序,并将 .NET Framework 安装程序包含到安装程序中

For developement/deployement on Visual Studio tools only c# or VB.net is required.对于 Visual Studio 工具上的开发/部署,仅需要 c# 或 VB.net。 Entire framework is required.需要整个框架。 Evrything has its own role (for what they are designed for). Evrything 有自己的角色(因为它们的设计目的)。 You cannot skip them.你不能跳过它们。 But yes, you can minimize the requirement by installing or utilizing the third party environments.但是,是的,您可以通过安装或利用第三方环境来最大限度地减少要求。 Since we all knwo VS is a licensed product and costs 1000's of $$$ but a framework is free to download and distribute.因为我们都知道 VS 是一种许可产品,价格为 1000 美元,但框架可以免费下载和分发。 Also to develop C# app with minimum requirements you can use icsharp .还可以使用icsharp以最低要求开发 C# 应用程序。 Its a lightweight and free to use.Net IDE..它是一个轻量级且免费使用的 .Net IDE..

you have to install a same .net framework in which you developed your c# application, you can find it from your pc, just go to the msvisualstudio setup folder and you can find tht, copy it and install it in client pc.你必须安装一个与你开发 C# 应用程序相同的 .net 框架,你可以从你的电脑上找到它,只需转到 msvisualstudio 安装文件夹,你可以找到它,复制它并将它安装在客户端电脑上。

Microsoft.ACE.OLEDB.12.0, will mostly be accepted in yo application if you run yo app as an 86x app, not a 64x. Microsoft.ACE.OLEDB.12.0,如果您将 yo 应用程序作为 86x 应用程序而不是 64x 运行,则大多数情况下都会在 yo application 中被接受。 try that试试那个

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

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