You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ArcGIS Pro 3.1插件开发为何抛出System.TypeLoadException异常?

ArcGIS Pro 3.1插件开发WCF管道绑定异常问题

我用C#开发ArcGIS Pro 3.1插件时,执行以下代码抛出异常:

var pipeFactory = new ChannelFactory<IWCFStarter>(new NetNamedPipeBinding(),
                                                  new EndpointAddress("net.pipe://localhost/SomeAdress"));

异常信息如下:

Exceptioninfo: 
Type: System.TypeLoadException 
ExceptionMessage: 
Could not load type 'System.ServiceModel.ExceptionHelper' from assembly 'System.ServiceModel.Primitives, Version=4.9.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Source: System.ServiceModel.NetNamedPipe 
Stack: 
   at System.ServiceModel.NetNamedPipeBinding..ctor() 
   at ARCBAR.InfoWindow.updateAddin_Click(Object sender, RoutedEventArgs e) in C:\ARCBAR\ARCBAR\InfoWindow.xaml.cs:line 35

项目已添加的NuGet包如下:

<ItemGroup>
    <PackageReference Include="System.Drawing.Common" Version="7.0.0" />
    <PackageReference Include="System.ServiceModel.NetNamedPipe" Version="6.0.0" />
    <PackageReference Include="System.ServiceModel.Primitives" Version="6.0.0" />
</ItemGroup>

另一项目中相同代码可正常运行,且未发现依赖项与NuGet包有明显差异。

补充排查信息:

  • 代码中无其他System.ServiceModel相关包引用;
  • 未加载插件时,ArcGIS Pro自身已加载版本为4.900.21.52002的System.ServiceModel.Primitives.dll及System.Private.ServiceModel.dll。

内容的提问来源于stack exchange,提问作者Gener4tor

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.17 03:32:17