SolrNET - Failed to load file or assembly "HttpWebAdapters" when pulling from Nuget

I use Nuget to get the latest version of SolrNET and StructureMap.SolrNetIntegration in my ASP.NET MVC project.

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

When the above line of code is called, I get the following error:

Failed to load file or assembly 'HttpWebAdapters, Version = 0.3.0.0, Culture = neutral, PublicKeyToken = bc21753e8aa334cb' or one of its dependencies. The located assembly manifest definitions do not match the assembly reference position. (Exception from HRESULT: 0x80131040)

I upgrade to the latest version (0.3.0) at the same time, and also pulls solrnet from Nuget for the first time - earlier the same code worked with the previous distribution package downloaded directly from the SolrNET website. I see that the problem occurs in the structuremap.solrintegration project when building solrnetregistry, but I do not understand why

[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 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

Does anyone know if something has changed or something is wrong?

thank

In JP

+1
source share
1 answer

Failed to create SolrNet.StructureMap NuGet package. I already fixed it and sent a pull request to the NuGet team. EDIT: A fix is ​​found.

+1
source

Source: https://habr.com/ru/post/1775419/


All Articles