.net core 引用wcf 在發佈的時候報錯提示:Could not load file or assembly 'System.Private.ServiceModel, Version=4.1.2.4, Culture=neutral, PublicKeyToken=b03f5f7f11d... ...
.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" />