How to run a C# .exe file on many computers?

柔情痞子 提交于 2019-12-01 05:24:33

Programs compiled with VS2010 can be targeted against a variety of .NET Frameworks. However, the many versions of Windows don't always have the most recent .NET versions installed.

Check which version of the .NET Framework your program is using by looking under the Application tab of your project properties. You should see a Target Framework drop down list, which will tell you what version of the framework other computers will need to have installed in order to run your program.

You have a few options to get your program working on other computers.

  1. Compile the program with a different, lower framework. (e.g. .NET 2 is often available on Windows XP, while .NET 4 is uncommon on this OS.) This will only work if you aren't using any features from later versions of .NET.
  2. Install the .NET framework you require on the client machine. Microsoft provides frameworks to download and install from http://www.microsoft.com/net/download
  3. Try creating a Windows Installer using the Setup Project template. Add a new project to your solution from the Setup and Deployment category. After setting up this project, you should have an installer to run on other machines.

You will have to have the appropriate version of the .NET Framework installed on the computer you want to run your application on.

This are the things that you need to do.

  1. Check if what OS version of your computer. If it's Windows XP check if it has .net framework 3.5 or to 4.0.You can download it here Microsoft .NET Framework 3.5

  2. Try to do Set up and deployment.

    Step-by-Step Process of Creating a Setup and Deployment Project

Best Regards

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!