Z
Z
zamzam2015-02-03 21:10:09
C++ / C#
zamzam, 2015-02-03 21:10:09

How to run C# project on another pc?

Hello, I made a small program in C # in visual studio 2010, and it needs to be run from another PC. How to do it? install the .net framework, install visual studio, or is it possible to somehow convert the project to be just an exe file, like c++ does?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Stanislav Makarov, 2015-02-04
@Nipheris

First, as GavriKos already noted, build the project in the Release configuration - the exe built in the release will be optimized not for debugging, but for use in production. Secondly, decide on the versions of Windows on which you will run the project - with 7 comes .net 3.5 (which includes 3.0 and 2.0), with 8 - 4.5 (which includes 4.0). If the OS version / .net version are in these pairs, then you don’t need to install the framework separately, if you didn’t get it (for example, your application under .net 4.5 needs to be run on the seven), then you need to get the installer from microsoft.com and install it on the target car. Thirdly, do not forget to attach all dependencies with the executable - if you used some libraries, then their assemblies should be included with the exe. In general, everything else is already specific to a particular application. For testing purposes, if you want to minimize the risks of non-startup, I can advise you to raise a clean virtual machine with acc. version of Windows, and try to run the application there in the form in which you prepared it. Then it will become clear what was not taken into account and what else needs to be put.

G
GavriKos, 2015-02-03
@GavriKos

Install .net - required. You don't need to set up a studio.
Please note that since win7 .net seems to be built in some kind.
And do not forget to build the application in the Release configuration.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question