Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does the end user need to run a C# console program?

Tags:

c#

console

I made a console game using Visual C# 2008 Express, the entire game only uses stuff from the System namespace, no fancy third party libraries, and all it requires is 2 folders in the root directory for storing XML files that it creates. I could even go into the Debug folder and copy the application and 2 folders and paste them elsewhere and they'll work. So I'm thinking I could just distribute the game as a zipped folder.

What I want to know is what is the bare minimum an end user who does not have Visual Studio installed need to run this game? I looked at one of my non-programmer friends and she has over 10 things with "Microsoft Visual" in their names like the .NET framework and Redistributable Package in her installed programs list. I don't really know what any of those are for.

like image 742
TreeTree Avatar asked Dec 13 '22 10:12

TreeTree


2 Answers

They will need to have the Microsoft .NET Framework installed - whichever version you're using, or a later one. That's all.

These days most Windows users are likely to have at least .NET 2 installed, and quite possibly a later version. If not, you can always point them to the redistributable to be downloaded and installed.

There shouldn't be any need for anything with "Visual" in the name.

One option for .NET 3.5 and onwards is to target the "Client Profile" in your project - this is a smaller download for end-users.

like image 165
Jon Skeet Avatar answered Dec 27 '22 01:12

Jon Skeet


The .NET framework is essential for every C# program. The .NET framework contains those namespaces you use. To my knowledge you can not install a part of it, you just have to install it whole.

But be careful when storing files. Usually your programs will be installed in the program files folder in which regular users don't have write rights. Use the %APPDATA% special folder to store any data files that your program must edit.

like image 45
GolezTrol Avatar answered Dec 27 '22 00:12

GolezTrol