Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving C# Program to another computer

Status
Not open for further replies.

sunnyjassal

Programmer
Feb 19, 2003
16
US
Hello,

Please excuse me as I am a java programmer who is working with C#. C# is pretty new to me so please bear with me. I have a pretty simple command line c# program. It executes fine on my computer. Now I am ready to move it on another computer. The other computer does not have .Net installed. I moved the whole directory to another computer and tried to run the .exe file, but got a message "To run this application, you must install one of the following versions of .NET Framework: v2.050727"

To my understanding it seems like I need to install .Net on that machine. Basically what I want to know is what are the steps I need to take to run my programs on other machines? Do I have to install the whole .Net framework for each computer? Usually for java programs I have to put the jre folder with all the jar files included in the application. Is there a similar process I can take for c# programs?

Thanks for your help in advace
 
Not the whole framework, if your intention is just to run the application on this machine you will have no need for the compiles and tools in the SDK. You need only the redistributable part of the framework. Google “.NET Distributable” it will take you to the page in Microsoft web site. In there you will find a lot of info about installation instructions and such. If you are using installation program, you can instruct it to install the package on the target machine if it is not already installed. Good luck and welcome to the .NET wonder land.

Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
Is there any way of including the run time version in the binn of the application? Also, lets say I am not using a install and I have some references in the application. What is the minumum, besides the .NET Framework, that I need to move to another computer. Is it the whole binn folder? or just the exe?
 
You will have to install the framework. It comes as a separate installer from MS.

In order to run your application, you will have to include the .exe and any other DLLs that you have referenced that are not part of the .net framework.

You are best off to include the entire Bin directory.
 
Keep in mind that while you are concerned about installing the whole .net framework, it is no different than a user needing to install the whole JRE. You cannot just copy your java files to a user's machine, they must be running a Java Virtual Machine on their computer.

----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top