mongodb client throws a FileNotFoundException

refs:

https://blog.youkuaiyun.com/wangzl1163/article/details/73162826

https://docs.microsoft.com/zh-cn/dotnet/framework/configure-apps/file-schema/runtime/assemblybinding-element-for-runtime

https://www.cnblogs.com/s5689412/p/9825010.html

 

1)mongodb client加载到web项目,本地运行OK,发布时提示缺少依赖“System.Runtime.InteropServices.RuntimeInformation

nuget安装依赖,依然无效。

使用本地web.config,OK,原来是webconfig中的runtime section影响的结果。

 <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.0.62.0" newVersion="1.0.62.0" />
      </dependentAssembly>

.....................................

 </runtime>

2)出现问题1的原因是多个版本dll的存在,程序不知选用哪个,需要指定,是否都兼容可用。

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值