B CUSP 110B – Digital Thinking Visual Studio IDE:
FAQ and Help |
|
Here are
the links to questions/answers in this document:
· Which IDE should I run, what is an IDE?
· How do I open a project? After I double clicked on .sln nothing happens?!
· How can I find the source code in my project? Solution Explorer and ClassExample.cs file?
· How do I compile and run?
· Why can’t I run? “But my green button is greyed out!?”
· Why can’t I edit? When I try type, I got a pop-up window with error …
· How can I see line number in my editor?
· Help! I am stuck after my program encounters an error! When I run my program, nothing happens and I saw an error window popped up …
Question: Which IDE? What is the difference between Microsoft Visual Studio 2010 (the one we use in the lab,), and Microsoft Visual C# Express 2010 (the one you download at home ()?
Question: Open the project? After I double click on my ClassExample.sln nothing happens?
· Start VS: (either Visual Studio 2010, or Visual C# 2010 Express) will do.
· After VS is running, open your ClassExample.sln as a project file:
·
Question: Solution Explorer and the Source code file (ClassExample.cs)? After I open my ClassExample.sln, this is what I see:
There is no source code or file listings on the right!? What do I do?
· Either: click on the red-highlight button below:
·
Or: under ViewàSolution Explorer:
·
Now you will see the Solution Explorer:
·
Double click on “ClassExample.cs” to bring up
the source code:
Question: Compile and run? How do I compile and run my program?
· First way: click on the red-highlight button in green:
·
Second way: under DebugàStart Debugging:
·
When your program starts to run, you will see
something like:
This is the window of your running program, or, the Program Window.
Question: Cannot run/debug? BUT my “button in green” is greyed-out and my Debug Menu look different?
· Grey-out button in green:
·
Or Debug menu looks like (no “Start Debugging”
item):
·
You can tell if your program is already running
by checking out the “lock” icon besides your source code
If you are seeing the above cases, then, your program is already running. Go your Program Window.
Question: Cannot edit? BUT When I try to edit ClassExample.cs, I got a pop-up window that says:
Changes
are not allowed while code is running or
if the option …
This message tells you that your program is already running, you cannot edit the source file when your program is currently running. You must find and close your current running Program Window before you will be able to edit again.
Question: Get line number to show up in editor? How can I get line number to show up in my VS editor?
· Tools à Options:
· In Options Window: Enable “Show All Settings”
·
In Options Window: Text Editor à
All Languages à
General
Question: Got stuck after error? When I run my program nothing happens and I saw An error message box (that probably looks something like the following):
·
Close the error window by clicking on the “X” of
the error window:
· Tell VS to stop running/debugging: at this point VS is still trying to figure out what is going, and you need to tell it to STOP, here is how:
o
Debug è Stop Debugging