简体   繁体   English

业务流程中的BizTalk C#名称空间冲突

[英]BizTalk C# namespace collision in orchestrations

In an orchestration I'm trying to set properties in an outgoing EDI message. 在业务流程中,我正在尝试在传出的EDI消息中设置属性。 In the message assignment I wrote: 在我写的消息分配中:

msgEDI850(EDI.DestinationPartyName) = HelperObj.EDIParty;

At compile time it chokes saying DestinationPartyName is not defined. 在编译时,它会说明没有定义DestinationPartyName。

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. C#编译器正在寻找“MyCompany.EDI”而不是“EDI”。

The IDE code completion shows EDI.DestinationPartyName is valid. IDE代码完成显示EDI.DestinationPartyName有效。

I changed the application namespace to not include EDI at any level. 我将应用程序命名空间更改为不包含任何级别的EDI。 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. 简单地说,无论层次结构中的命名空间如何,XLang编译器都很容易被混淆。

Sorry, but the solution is that you cannot use any BizTalk owned namespace in any of your apps. 抱歉,解决方案是您不能在任何应用程序中使用任何BizTalk拥有的命名空间。 There is no way around this. 没有办法解决这个问题。 USING is not supported either. 也不支持USING。

So, no EDI, BTS, BTS2, BizTalk etc. 所以,没有EDI,BTS,BTS2,BizTalk等。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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