tags:

views:

735

answers:

5

Hi I'm very new to C#. I just finished designing a simple code program. I called it a "Guessing Game". The program is so far working fine and I would like to open it without opening my Microsoft Visual Studio.

How can I do that?

Thanks

A: 

On your project folder, open up the bin\Debug subfolder and you'll see the compiled result.

Adrian Godong
hi Adrian it seems I can't find the bin\Debug? Where it is exactly located?
tintincute
It's located in the same folder where the .cs file of your program are. Click onto any of them and select "Save As" - the dialog will open exactly in the project folder.
sharptooth
I highlighted the folder and select save as then bin\Debug and I see nothing under Debug. Shall I just click save here with the same Object name of my project is that ok?
tintincute
A: 

In the project file is folder "bin/debug/your_appliacion_name.exe". This is final executable program file.

TcKs
A: 

Compile the Release version as .exe file, then just copy onto a machine with a suitable version of .NET Framework installed and run it there. The .exe file is located in the bin\Release subfolder of the project folder.

sharptooth
A: 

Set the build configuration to 'Release'

Create an executable (.exe) by Building the project. It will be in the \bin\Release folder underneath the project folder and be named 'projectname'.exe

Mitch Wheat
+6  A: 

The easiest way is:

  • Find the dropdown box at the top of Visual Studio's window that says "Debug"
  • Select "Release"
  • Hit F6 to build it
  • Switch back to Debug and then close Visual Studio
  • Open Windows Explorer and navigate to your projects folder (My Documents\Visual Studio 200x\Projects\my_project)
  • Now go to bin\Release\ and copy the executable from there to wherever you want to store it.
  • Make shortcuts as appropriate and enjoy your new game! :)
Matthew Scharley
Is it in the Solution Configuration Drop down? I've seen it before but mine is grayed out now. I don't have any idea why?
tintincute
If you can't change it, it doesn't really matter. Look in bin\Debug\ instead then. You may not have a release configuration setup, though normally new projects get one setup automatically. All it does is strip debugging information out of the executable, which can make the program smaller and run slightly faster.
Matthew Scharley
thanks I'm in bin\Debug now but I don't see any file under Debug.
tintincute
That's odd, but if you try to run your program inside Visual Studio, then close it all again there should be stuff there
Matthew Scharley
Not really sure how to find the bin\Debug here. I highlighted the Form.cs and select save as... and look for bin\Debug here. But it's empty. Not sure what to do next. The thing that I can do is just save. Am I on the right direction?
tintincute
No, open Windows Explorer and look in there... The save as dialog was just an attempt by someone else to show you where to open Window Explorer in.
Matthew Scharley
yeah it's quite odd.What I did now is, I went to the folder where my program is and then click on "bin" here I saw two folders Debug and Release. Under Debug I have these files: GameGuessing.vshost.exe, GameGuessing.exe,GameGuessing.pdb, GameGuessing.vshost.exe manifest. And under Release folder, it's empty. Shall I do it here?
tintincute
Just copy GameGuessing.exe to wherever you want it, that's the only file you need to run it outside VS.
Matthew Scharley
I see so I don't need anything. :-) Thanks for the help
tintincute
another question, what does it mean in your second to the last directions to go to bin\Release and copy the executable from there. Do I need to do something with the Release?
tintincute
no, you got the executable from bin\Debug instead.
Matthew Scharley
thanks for the help:-)
tintincute