在BizTalk中,出站逻辑端口(Send Port)在编排中删除后,可能会导致编译错误,因为编译器仍然会尝试生成与该端口相关的代码。下面是解决此问题的一种方法:
以下是一个示例代码片段,显示如何更改出站逻辑端口的“OutboundTransportType”属性:
// 打开编排文件
Microsoft.XLANGs.BaseTypes.SchemaBase.Compile(new FileInfo("YourOrchestration.odx"));
// 获取出站逻辑端口
SendPort sendPort = YourOrchestration.SendPort_1;
// 更改OutboundTransportType属性为None
sendPort.OutboundTransportType = null;
// 保存编排文件
YourOrchestration.odxFile.Save();
通过执行上述步骤和代码示例,您应该能够解决“BizTalk:出站逻辑端口未从编排中删除”的问题。