ASP.NET Core部署后报错: Could not load file or assembly 'System.Private.ServiceModel, Version=4.1.2.4, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

.net core  引用wcf 在发布的时候报错提示:Could not load file or assembly 'System.Private.ServiceModel, Version=4.1.2.4, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'

解决办法将 wcf 的引用包版本升级到4.5.0以上就可以了

<PackageReference Include="System.ServiceModel.Duplex" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Http" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.NetTcp" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Security" Version="4.5.0" />

 

posted @ 2022-01-13 18:29  林小强  阅读(423)  评论(0编辑  收藏  举报