Taylor90

i've been following this book step by step. it's called "Build a Program NOW!". im stuck on page 41. it tells me to us the "Start Without Debugging" command. everything seem to work right.. says at the bottom right "build started" immediately followed by "build succeded"... but nothing happens! there is no command prompt like there should be! what's going on

Re: Visual C# Express Edition "Start Without Debugging" error?

jrboddie

Are you sure you are clicking on the correct button   It is an unfilled triangle.

Make sure you have closed the Customize dialog.

Or use the menu:  Debug > Start without debugging

Or use Ctrl+F5

 





Re: Visual C# Express Edition "Start Without Debugging" error?

Taylor90

1.yes

2. customize dialog you mean closing the "program.cs" if so, i did that too.

3. did it

4. did it

there is supposed the be a command prompt after i start without debugging. i see the little message at the bottom right as follows "build started" then "build succeeded" after that, nothing happens.

please look at my code just in case. i copied word for word from book and should be all correct.

using System;
using System.Collections.Generic;
using System.Text;

namespace MyFirstConsoleApplication
{
class Program
{
static void Main(string[] args)
{
// Declaring two integer numbers variables that will hold the 2 parts
// of the sum and one integer variable to hold the sum
int number1;
int number2;
int sum;

// Assigning two values to the integer variables
number1 = 10;
number2 = 5;

// Adding the two integers and storing the result in the sum variable
sum = (number1 + number2);

// Displaying a string with the 2 numbers and the result.
Console.WriteLine("the sum of " + number1.ToString() + " and " + number2. ToString() +" is " + sum.ToString());
}
}
}




Re: Visual C# Express Edition "Start Without Debugging" error?

jrboddie

I mentioned closing the Customize dialog because that is the step in the book prior to running your program. If it is still open, I don't think the buttons in the toolstrip will function.

Anyway, looks like you have tried several ways to run the program.

What you should see, is the appearance of a window that looks like Figure 3-15 (on page 41) when you run the program without debugging. I copied your code into my visual studio and it worked as expected.





Re: Visual C# Express Edition "Start Without Debugging" error?

Taylor90

all the stuff works fine in the toolbar (such as debug). but when i use the function "start without debugging" it appears to be doing the job right, just no command prompt. my educated guess is that it is closing the command prompt immidiatly after it starts because it "thinks it's done", so it doesn't "thinks" you don't need to press a key to continue.

maybe i should refer to my configurations what should be configured or checked off




Re: Visual C# Express Edition "Start Without Debugging" error?

Solitaire

Try adding:

Console.ReadLine();

as the last statement in the program. It should pause the program execution even if you are running with "Start Debugging."

Are you sure you configured your IDE to include the "Start Without Debugging" command It's not included as part of the default setting in the Express editions. Instructions for changing the setting are given in the early part of the book.






Re: Visual C# Express Edition "Start Without Debugging" error?

Taylor90

the "start without debugging" command has been added to my IDE (or what i like to call the toolbar). doesn't work. actually i already added it to my IDE before i posted my question.

when i add Console.ReadLine(); it requests a number in the parenthesis. otherwise it is an error. i doubt this would help anyway.

this is a becoming a very annoying problem...

EDIT: I HAVE NO CLUE WHY THE TEXT IS SMALL!!