简体   繁体   中英

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?

I need to make my project run from an EXE file. 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.

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. 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). If in doubt copying everything will probably work - at worst some of those files are just unneccessary (such as the.vshost files).

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. 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. 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.

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

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 clickonce

You just have to install.Net Framework on the target computer.

You always need to install the .NET framework in the client PC.

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

For developement/deployement on Visual Studio tools only c# or VB.net is required. Entire framework is required. Evrything has its own role (for what they are designed for). 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. Also to develop C# app with minimum requirements you can use icsharp . Its a lightweight and free to use.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.

Microsoft.ACE.OLEDB.12.0, will mostly be accepted in yo application if you run yo app as an 86x app, not a 64x. try that

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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