views:

32

answers:

1

I've finally tracked down an issue to bad code left in my ODX, presumably by Visual Studio

I had a Construct Message with a Transform and Message Assignment in it ...

Whenever I compiled, I was getting errors pointing at the assignment shape, and its usage of a distinguished promotion.

I edited the Message Assignment ... removed the line of code, applied change, pasted back the same line of code ... now solution compiles fine !!

I compared the ODX file, before and after, and spotted the original error message in the actual ODX ...

transform (msgToAudit.parameters) = FoToIaW.trnsFromFo_ToAuditParameters (msgFromFo);
#error "The expression that you have entered is not valid."

I didn't put it there, so I presume Visual Studio has added this to the ODX file ?

  • is that the case ?
  • and what's Visual Studio doing sticking errors in my actual code !!

Also, is there anyway to "clean" the ODX of this sort of "injected" code, as the error occasionally reappears and I can't see the pattern that triggers it.

+2  A: 

Agreed that this is a most frustrating bug (and here)

There is a hotfix for BTS 2009 - I'm not sure that this will help you in 2006R2 though.

Have you tried a clean and rebuild on the solution?

nonnb
Glad to know it wasn't me going mad ! I did try many things to get it to work, clean and rebuild included, but no luck. Finally did a difference versus an older working copy from source control and spotted the "embedded error code"
SteveC
@SteveC ... same here. This bug is really annoying. Thanks for the link to the hotfix.
Filburt