P
p3john
Hi all,
Not sure if this is the correct newsgroup for this, but I'm in a jamb and
need some input.
I came across a problem that I think is related to the C# compiler in Visual
Studio 2008. The behavior is described by by Kathleen Dollard
(http://www.gendotnet.com/Home/TechnicalPapers/VisualBasic90CompilerBug/tabid/652/Default.aspx) - however my project environment is different.
Here's the gist: I have an assembly with a class in it, I write pages of
code and compile it.
Part of my code says something like:
if ( customer.ReturnPayment )
{
// do cool stuff here
}
if ( customer.RequiresCreditApproval )
{
// do other even cooler stuff here
}
That second IF statement never makes it to the compiled assembly. I can tell
this because I do 2 things that demonstrate the bug (if it's a bug). First, I
set a breakpoint inside the first IF statement (breakpoint on "do cool
stuff"), second I run the app in the debugger.
As soon as the debugger starts the breakpoint moves to the second IF
statement.
I dissassemble the assembly using Reflector, the first IF statement not
there; thus the breakpoint issue.
Now, if I change the Target Framework of my project from .Net Framework 2.0
to 3.5 - everything works fine.
Unfortunately, I cannot use 3.5 yet - minimum system requires for
application specify 2.0.
I need a solution or at least an reason as to *why* this happens, any ideas?
-John
Not sure if this is the correct newsgroup for this, but I'm in a jamb and
need some input.
I came across a problem that I think is related to the C# compiler in Visual
Studio 2008. The behavior is described by by Kathleen Dollard
(http://www.gendotnet.com/Home/TechnicalPapers/VisualBasic90CompilerBug/tabid/652/Default.aspx) - however my project environment is different.
Here's the gist: I have an assembly with a class in it, I write pages of
code and compile it.
Part of my code says something like:
if ( customer.ReturnPayment )
{
// do cool stuff here
}
if ( customer.RequiresCreditApproval )
{
// do other even cooler stuff here
}
That second IF statement never makes it to the compiled assembly. I can tell
this because I do 2 things that demonstrate the bug (if it's a bug). First, I
set a breakpoint inside the first IF statement (breakpoint on "do cool
stuff"), second I run the app in the debugger.
As soon as the debugger starts the breakpoint moves to the second IF
statement.
I dissassemble the assembly using Reflector, the first IF statement not
there; thus the breakpoint issue.
Now, if I change the Target Framework of my project from .Net Framework 2.0
to 3.5 - everything works fine.
Unfortunately, I cannot use 3.5 yet - minimum system requires for
application specify 2.0.
I need a solution or at least an reason as to *why* this happens, any ideas?
-John