c# – 错误:无法完成程序集的设置(hr = 0x8013101b).探测终止
我看到这个奇怪的问题.我想告知这个错误有很多帖子,但没有一个解决了我所面临的问题.以下是我的设置.
>我有一个exe文件,在这个文件的csproj中,目标框架版本设置为v3.5 这意味着即使使用v3.5构建的exe,它应该支持加载带有v4.5的dll吗? //Config file entry start <startup> <supportedRuntime version="v2.0.50727"/> <supportedRuntime version="v4.0"/> <supportedRuntime version="v4.5"/> </startup> //Config file entry end //Error start Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64v2.0.50727mscorwks.dll Running under executable d:My.exe --- A detailed error log follows. === Pre-bind state information === LOG: User = LOG: Where-ref bind. Location = d:MyCustom.dll LOG: Appbase = file:///D:/ LOG: Initial PrivatePath = NULL Calling assembly : (Unknown). === LOG: This bind starts in LoadFrom load context. WRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context,like with Assembly.Load(). LOG: Using application configuration file: d:My.exe.Config LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v2.0.50727configmachine.config. LOG: Attempting download of new URL file:///D:/MyCustom.dll. ERR: Failed to complete setup of assembly (hr = 0x8013101b). Probing terminated. 我的控制面板说,我有.NET framework 4.5,但我看不到’Full’条目,我只看到’client’How to: Determine Which .NET Framework Versions Are Installed 我也尝试过安装.NET 4.5,但它只是 – 它试图修复. 任何线索.请帮忙.谢谢. 解决方法
查看supportedRuntime元素的
documentation,订单很重要.
Assembly manager loaded from: C:WindowsMicrosoft.NETFramework64v2.0.50727mscorwks.dll 这告诉您正在运行.NET 2.0运行时.在2.0运行时运行时,您永远无法加载4.5 dll. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |