加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – System.Spatial程序集问题

发布时间:2020-12-16 02:04:05 所属栏目:百科 来源:网络整理
导读:我最近尝试在本地运行我的应用程序来测试一些东西,但我不能因为程序集问题.特别: Could not load file or assembly ‘System.Spatial,Version=5.2.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot
我最近尝试在本地运行我的应用程序来测试一些东西,但我不能因为程序集问题.特别:

Could not load file or assembly ‘System.Spatial,Version=5.2.0.0,
Culture=neutral,PublicKeyToken=31bf3856ad364e35’ or one of its
dependencies. The system cannot find the file specified.

所以,我去了这里,并找到了一个引用,可以手动添加配置文件,也可以通过NuGet卸载并重新安装.我们不使用NuGet来处理任何事情,因此我担心更改应用程序以开始这样做.因此,我开始编辑配置文件以尝试解决此问题.
我添加了以下行,并解决了无法加载System.Spatial问题:

<dependentAssembly>
    <assemblyIdentity name="Microsoft.Data.Edm" publicKeyToken="31bf3856ad364e35" culture="neutral" />
    <bindingRedirect oldVersion="0.0.0.0-5.5.0.0" newVersion="5.5.0.0" />
</dependentAssembly>

但现在我收到这条消息:

Could not load file or assembly ‘Microsoft.Data.Edm’ or one of its
dependencies. The located assembly’s manifest definition does not
match the assembly reference. (Exception from HRESULT: 0x80131040)

也许publicKeyToken与版本更改不准确?我不确定首先打破程序集会发生什么(因为我没有修改代码,也没有使用NuGet来更新此项目的程序包),或者为什么清单已关闭.

任何人都可以了解这里发生的事情,它是如何引起的,以及我可以采取的其他可能的步骤来纠正它?

解决方法

我遇到了同样的问题.删除System.Spatial(版本5.6.3)引用并添加System.Spatial(版本5.6.4)将解决该问题.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读