简体   繁体   中英

BizTalk C# namespace collision in orchestrations

In an orchestration I'm trying to set properties in an outgoing EDI message. In the message assignment I wrote:

msgEDI850(EDI.DestinationPartyName) = HelperObj.EDIParty;

At compile time it chokes saying DestinationPartyName is not defined.

The error details show it's looking in the wrong namespace. The C# compiler is looking in "MyCompany.EDI" instead of "EDI" as it should be.

The IDE code completion shows EDI.DestinationPartyName is valid.

I changed the application namespace to not include EDI at any level. This does not work:

msgEDI850(global::EDI.DestinationPartyName) = HelperObj.EDIParty;

Any suggestions on how to get it to use the correct namespace in the auto generated code?

What you are seeing is a long standing and expected behavior. Simply, the XLang compiler is easily confused by clashing namespaces, no matter where they are in the hierarchy.

Sorry, but the solution is that you cannot use any BizTalk owned namespace in any of your apps. There is no way around this. USING is not supported either.

So, no EDI, BTS, BTS2, BizTalk etc.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM