Home All Groups Group Topic Archive Search About

running c# executable....

Author
15 Sep 2005 2:22 AM
tracernet_v2
fellow c# programmers...

i need some help....
i have created a program, a module that is part of another bigger
program...
when i debug it, by pressing F5 in the IDE, it runs so well i can
hardly  wait to show it to my project leader...
but when i try to run the executable created by the IDE, the .exe file
in the Debug folder, it catches exceptions and stops the program...

what bothers me so much is that:
1) it runs so well when i debug it(pressing F5 in the IDE), but the
..exe file doesnt...
2) my deadline is already here!!!!!!!

please tell me what to do with this one....
thanks in advance...

Author
15 Sep 2005 3:51 AM
jeremiah johnson
You're going to need to ask specific questions in order to get help, I
think.  We'll need to see your code.

tracernet_v2 wrote:
Show quoteHide quote
> fellow c# programmers...
>
> i need some help....
> i have created a program, a module that is part of another bigger
> program...
> when i debug it, by pressing F5 in the IDE, it runs so well i can
> hardly  wait to show it to my project leader...
> but when i try to run the executable created by the IDE, the .exe file
> in the Debug folder, it catches exceptions and stops the program...
>
> what bothers me so much is that:
> 1) it runs so well when i debug it(pressing F5 in the IDE), but the
> .exe file doesnt...
> 2) my deadline is already here!!!!!!!
>
> please tell me what to do with this one....
> thanks in advance...
>
Are all your drivers up to date? click for free checkup

Author
15 Sep 2005 4:04 AM
tracernet_v2
"jeremiah johnson" wrote:
>You're going to need to ask specific questions in order to get help, I
>think.  We'll need to see your code.
>


ok then...
i just want to ask for some tips on what to do regarding this matter...
as for the source code, i do not think i could, the project is a bit
classified...

but i just would like to ask if you guys had encountered this one...
when i try to debug the program, that is by pressing F5 in the IDE, the
program works very fine and runs without throwing any exception...

as we know the IDE would create the equivalent executable file in the
Debug folder of the working folder right...?
when i try to run that executable file, it runs smoothly but throws some
exceptions which had been filtered already...
i can see the executable catches some errors when it shouldnt have...

please help... give me some tips on what to do with this...

acem-tracernet
software devt staff

C# programmer

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Author
15 Sep 2005 5:34 AM
Jon Skeet [C# MVP]
tracernet_v2 <hykur***@gmail.com> wrote:
> fellow c# programmers...
>
> i need some help....
> i have created a program, a module that is part of another bigger
> program...
> when i debug it, by pressing F5 in the IDE, it runs so well i can
> hardly  wait to show it to my project leader...
> but when i try to run the executable created by the IDE, the .exe file
> in the Debug folder, it catches exceptions and stops the program..

As ever, if you've got exceptions you don't understand, it would really
help if you could at least tell us what those exceptions are.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Author
15 Sep 2005 5:58 AM
tracernet_v2
"Jon Skeet [C# MVP]" wrote:
>
>As ever, if you've got exceptions you don't understand, it would really
>help if you could at least tell us what those exceptions are.
>

actually, i have understood the exceptions, i had even trapped them....
but my real problem is that the executable catches exceptions(i had
trapped before) and end immaturely....
it bugs me because when i try debugging the program while it is in
development stage, that is when i press F5 in the IDE, the program runs
smoothly without any exception to immaturely end it...

-----
acem-tracernet
software devt staff

C# programmer

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Author
15 Sep 2005 6:06 AM
Jon Skeet [C# MVP]
tracernet_v2 <hykur***@gmail.com> wrote:
> >As ever, if you've got exceptions you don't understand, it would really
> >help if you could at least tell us what those exceptions are.
>
> actually, i have understood the exceptions, i had even trapped them....
> but my real problem is that the executable catches exceptions(i had
> trapped before) and end immaturely....
> it bugs me because when i try debugging the program while it is in
> development stage, that is when i press F5 in the IDE, the program runs
> smoothly without any exception to immaturely end it...

That doesn't really help us to pin down what's wrong though, does it?
Effectively, you've just given us:

"My program works in the debugger but doesn't work outside the
debugger."

Can you see how that makes it rather difficult to help you without any
more information?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Author
15 Sep 2005 6:14 AM
tracernet_v2
"Jon Skeet [C# MVP]" wrote:
>tracernet_v2 <hykur***@gmail.com> wrote:

>That doesn't really help us to pin down what's wrong though, does it?
>Effectively, you've just given us:
>
>"My program works in the debugger but doesn't work outside the
>debugger."
>
>Can you see how that makes it rather difficult to help you without any
>more information?

yes... yes... that is it!!!!
that is my problem...
My program works in the debugger but doesn't work outside the
debugger...
can you help me? can you give me some tips on how to deal with this
problem????

thanks so much in advance....

-----
acem-tracernet
software devt staff

C#-VB.NET programmer

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Author
15 Sep 2005 6:25 AM
Jon Skeet [C# MVP]
tracernet_v2 <hykur***@gmail.com> wrote:
Show quoteHide quote
> "Jon Skeet [C# MVP]" wrote:
> >tracernet_v2 <hykur***@gmail.com> wrote:
>
> >That doesn't really help us to pin down what's wrong though, does it?
> >Effectively, you've just given us:
> >
> >"My program works in the debugger but doesn't work outside the
> >debugger."
> >
> >Can you see how that makes it rather difficult to help you without any
> >more information?
>
> yes... yes... that is it!!!!
> that is my problem...

Yes, and the problem *we've* got is that that's just not nearly enough
information.

What would you do if a developer said to *you*: "My program doesn't
work. What's wrong?"

> My program works in the debugger but doesn't work outside the
> debugger...
> can you help me? can you give me some tips on how to deal with this
> problem????

I suggest you start cutting down your program until you've got a short
but complete program which demonstrates the problem. That program will
almost certainly not need to have anything confidential in it, which
means you'll be able to post it here, if you haven't already found the
answer by going through the exercise in the first place.

See http://www.pobox.com/~skeet/csharp/complete.html

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Author
15 Sep 2005 6:34 AM
Tim Haughton
"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MPG.1d93242a80937dbb98c712@msnews.microsoft.com...
> >
> > yes... yes... that is it!!!!
> > that is my problem...
>
> Yes, and the problem *we've* got is that that's just not nearly enough
> information.

It must be a wind up Jon.

He'll probably tell us that it's a System.VagueException.

Author
15 Sep 2005 6:43 AM
tracernet_v2
ok...
thanks for the suggestion...
i will try to do that...

but any way, my problem is very similar to that one...
my program works well in the debugger, but it doesnt work outside the
debugger...
so for now i would like to ask if you have gone through that one, and
what did you do.. did you do something to the properties or any thing
around the debugger...?

just want to know....

-----
acem-tracernet
software devt staff

C#-VB.NET programmer

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Author
15 Sep 2005 6:53 AM
Tim Haughton
Ignore the debugger, you can't ship your IDE with the product. Write your
unity tests and run them against the release executable. They will help you
find your problem. Things in .Net are rarely mystical. You'll be doing
something wrong.

Show quoteHide quote
"tracernet_v2" <hykur***@gmail.com> wrote in message
news:utXYMDcuFHA.2008@TK2MSFTNGP10.phx.gbl...
> ok...
> thanks for the suggestion...
> i will try to do that...
>
> but any way, my problem is very similar to that one...
> my program works well in the debugger, but it doesnt work outside the
> debugger...
> so for now i would like to ask if you have gone through that one, and
> what did you do.. did you do something to the properties or any thing
> around the debugger...?
>
> just want to know....
>
> -----
> acem-tracernet
> software devt staff
>
> C#-VB.NET programmer
>
> --
> Sent via .NET Newsgroups
> http://www.dotnetnewsgroups.com
Author
15 Sep 2005 7:18 AM
tracernet_v2
"Tim Haughton" wrote:
>Ignore the debugger, you can't ship your IDE with the product. Write
your
>unity tests and run them against the release executable. They will help
you
>find your problem. Things in .Net are rarely mystical. You'll be doing
>something wrong.
>


i am new to this words, so could you please explain to me this phrases:

"Write your unity tests and run them against the release executable. "

"Things in .Net are rarely mystical. You'll be doing something wrong."

hope you could enlighten me with these....

-----
acem-tracernet
software devt staff

C#-VB.NET programmer

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Author
15 Sep 2005 7:23 AM
Jon Skeet
tracernet_v2 wrote:
> ok...
> thanks for the suggestion...
> i will try to do that...
>
> but any way, my problem is very similar to that one...
> my program works well in the debugger, but it doesnt work outside the
> debugger...
> so for now i would like to ask if you have gone through that one, and
> what did you do.. did you do something to the properties or any thing
> around the debugger...?

There are *lots* of different reasons why it might be happening - but
without any more information from you, we just won't be able to help
you any further. Can't you at least tell us what the exception is?

Jon
Author
15 Sep 2005 8:07 AM
tracernet_v2
"Jon Skeet" wrote:
>
>There are *lots* of different reasons why it might be happening - but
>without any more information from you, we just won't be able to help
>you any further. Can't you at least tell us what the exception is?
>
>Jon
>

ok... here it is...

the first exception said that "Input string is in invalid format."

the next one said that it "cannot find the file <file name>", a file
that is existing all along....

the other one said that it "cannot proceed because the file <file name>
is used by another process"

please keep in mind that these exceptions occur outside the
debugger/IDE, that when i run the executable file itself these
exceptions occur, and the program works will with the debugger...

i am using Visual Studio 2003 IDE....

-----
acem-tracernet
software devt staff

C#-VB.NET programmer

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Author
15 Sep 2005 9:49 AM
Jon Skeet
> ok... here it is...

Finally, some information!

> the first exception said that "Input string is in invalid format."

At which point? What input string? Is this a problem you've fixed?

> the next one said that it "cannot find the file <file name>", a file
> that is existing all along....

How are you referring to it? The working directory of the process
may well be different when running in a debugger...

> the other one said that it "cannot proceed because the file <file name>
> is used by another process"

That sounds like you may not be disposing of FileStreams (and the like)
properly - the debugger may be garbage collecting earlier than when you
run it outside the debugger.

Jon

Bookmark and Share