Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / April 2007

Tip: Looking for answers? Try searching our database.

C# code works if running from Visual studio, but not from executable file?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
linda.chen@faa.gov - 02 Apr 2007 15:52 GMT
Greeting.

We have a 6 year old application, which contains both managed (C#) and
unmanaged code (C++). For all the new components we try to create them
in C#. We  build all projects (both C++ and C# code) into a solution
from visual studio .net 2003.

In out solution we have a project implementing a pretty complicated
math algorithm. This component usally work very well. But in a couple
weeks ago,  a user found a case that our algorithm did not work
correctly.

We are trying to debug the problem. The odd thing is: when we run the
application from visual studio, it works from both debug and release
mode. But if we run it from the executable file directly (double click
on the exe file from the output folder), the application stop working
for that case.

Any idea what caused this problem? How do we debug our code in this
case? We have run out of the ideas.

Linda
Kevin Spencer - 02 Apr 2007 17:43 GMT
Can you define what you mean by "works," "work," and "stop working?" In
other words, what is the expected behavior? What is the behavior when you
are debugging? What is the behavior when you are not debugging? Also, is the
error occurring in the C# modules or the C++ modules?

Meanwhile, just a shot in the dark: See if there are any preprocessor
statements that affect the behavior of the app when debugging, as in

#if debug

Signature

HTH,

Kevin Spencer
Microsoft MVP

Printing Components, Email Components,
FTP Client Classes, Enhanced Data Controls, much more.
DSI PrintManager, Miradyne Component Libraries:
http://www.miradyne.net

> Greeting.
>
[quoted text clipped - 18 lines]
>
> Linda
Mubashir Khan - 02 Apr 2007 18:03 GMT
maths algorithm .... hmmmmmmm
what has changed in couple of weeks ..... hmmmmmmmm
is it new law for daylight saving ..... hmmmmmmm

> Greeting.
>
[quoted text clipped - 18 lines]
>
> Linda
oscar.acostamontesde@googlemail.com - 03 Apr 2007 12:21 GMT
On Apr 2, 4:52 pm, linda.c...@faa.gov wrote:
> Greeting.
>
[quoted text clipped - 18 lines]
>
> Linda

Hello Linda:
Have you tryed to do some loggin in your app? Try writing some
instrumentation code to a file and see the results after execution.
Best regards.
Oscar Acosta
Ron Allen - 04 Apr 2007 14:26 GMT
Linda,
   Have you checked to make sure all variables are being properly
initialized?  Sometimes the development environment will set things to 0 to
start with that will be set to a random value outside the environment if not
initialized.

Ron Allen
> Greeting.
>
[quoted text clipped - 18 lines]
>
> Linda

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.