4

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.

TreeTree
  • 3,200
  • 3
  • 27
  • 39

5 Answers5

9

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.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194
  • @Varun: I'm not really sure what your comment is aimed at... what "abuse" are you talking about? – Jon Skeet Aug 13 '11 at 08:18
  • I meant if you look at the answer I provided, I think it is conformant with the SOF's policies. Any question should have some thought and research put into it. The link I provided is another question on SOF only which has this entire Q&A covered. And the 'abuse' is not your fault, its the followers who love you so (me included). – vvohra87 Aug 13 '11 at 08:25
  • And to be honest, I am very new as a member to SOF (been using it for reference for months thou) so I am not certain of myself - I know you are famous here so I should ask (since I dont know): If I see a question which has been answered previously, should I provide an answer anyway or should I point the questioner to the other question? – vvohra87 Aug 13 '11 at 08:29
  • @Varun: Usually it's best to leave a comment in the question, so that those with enough rep to vote to close as a duplicate can do so. When you've got enough rep, you should vote to close it yourself. – Jon Skeet Aug 13 '11 at 08:31
  • cool stuff, will do! Btw - you ever going to venture towards Ruby or Python? I love C# but the hosting costs kill my company and my clients!! – vvohra87 Aug 13 '11 at 08:40
2

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.

GolezTrol
  • 114,394
  • 18
  • 182
  • 210
  • There is a special [Client Profile for .NET](http://msdn.microsoft.com/en-us/library/cc656912.aspx) that allows you to selectively install bits of the framework. – vvohra87 Aug 12 '11 at 20:28
  • 1
    Well thank you... invalidating my answer by changing my knowledge. ;) – GolezTrol Aug 12 '11 at 20:30
  • Wow. I actually got upvotes, while Jon Skeet posted an answer too. :s – GolezTrol Aug 12 '11 at 20:50
  • Sad thing is that my answer is totally ignored, even thou it adheres to the website's ethics completely. This question has been answered like 10 times in the link I gave... – vvohra87 Aug 12 '11 at 20:55
1

If you have not used third-party components that you just installed on the target PC NETFramework you used to create your application.

Regards.

1

Please refer this question on deployment of C# applications on the desktop environment.

edit: It has interesting answers regarding best practices when deploying c# applications for the desktop.

To your specific question I think Jon has summed it up perfectly in his answer. Nothing with 'Visual' is required.

end edit

Cheers!

Community
  • 1
  • 1
vvohra87
  • 5,594
  • 4
  • 22
  • 34
  • Well, I can't see anything in the linked question about what's required in terms of .NET itself, or the client profile etc. I'd say most of the answers here actually provide more useful information *for this specific question*, which is talking about whether just copying the executable over will work - considerably simpler than using a deployment/setup project *if* the framework is already installed. – Jon Skeet Aug 13 '11 at 08:30
  • @Jon Skeet: Funniest thing - I just reviewed that question thread and just now noticed you have the answer there as well!! And I concede regarding 'specificity' of answers. – vvohra87 Aug 13 '11 at 09:01
0

You can also target a different Framework. If you don't need .NET 4.0 stuff, target .NET 3.5. If you not even need .NET 3.5 stuff, then target .NET 2.0. So users with only older versions installed will be able to play your game. They never need to have any Visual Studio version installed!

Olivier Jacot-Descombes
  • 104,806
  • 13
  • 138
  • 188