SolrNET - 从 Nuget 拉取时无法加载文件或程序集“HttpWebAdapters”

2024-03-26

我正在使用 Nuget 在 ASP.NET MVC 项目中获取最新版本的 SolrNET 和 StructureMap.SolrNetIntegration。

x.IncludeRegistry(new SolrNetRegistry(((SolrConfigurationSection)ConfigurationManager.GetSection("solr")).SolrServers));

当调用上面的代码行时,我收到以下错误:

无法加载文件或程序集 'HttpWebAdapters,版本=0.3.0.0, 文化=中立, PublicKeyToken=bc21753e8aa334cb' 或 它的依赖项之一。位于的 程序集的清单定义确实 与装配参考不匹配。 (HRESULT 异常:0x80131040)

我同时升级到最新版本(0.3.0),并首次从 Nuget 中提取 solrnet - 之前相同的代码可与直接从 SolrNET 站点下载的先前发行版一起使用。我可以看到在构建 solrnetregistry 时,问题出现在 Structuremap.solrintegration 项目中,但我不知道为什么

[FileLoadException: Could not load file or assembly 'HttpWebAdapters, Version=0.3.0.0, Culture=neutral, PublicKeyToken=bc21753e8aa334cb' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   StructureMap.SolrNetIntegration.SolrNetRegistry..ctor(SolrServers solrServers) in c:\prg\SolrNet\svn\StructureMap.SolrNetIntegration\SolrNetRegistry.cs:40
   myproj.Core.BootStrapper.<ConfigureStructureMap>b__1(IInitializationExpression x) in C:\Users\jp\Documents\Visual Studio 2010\Projects\myproj\myproj.Core\BootStrapper.cs:66
   StructureMap.ObjectFactory.Initialize(Action`1 action) +143
   myproj.Core.BootStrapper.ConfigureStructureMap() in C:\Users\jp\Documents\Visual Studio 2010\Projects\myproj\myproj.Core\BootStrapper.cs:37
   myproj.Core.MvcApplication.Application_Start() in C:\Users\jp\Documents\Visual Studio 2010\Projects\myproj\myproj.Core\Global.cs:131

有谁知道事情是否发生了变化或者我是否做错了什么?

Thanks

JP


SolrNet.StructureMap NuGet 包的构建不正确。我已经修复了它并向 NuGet 团队发送了拉取请求。编辑:修复已完成。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

SolrNET - 从 Nuget 拉取时无法加载文件或程序集“HttpWebAdapters” 的相关文章

随机推荐