Question

I am using 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 invoked I receive the following error:

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)

I am concurrently upgrading to the latest version (0.3.0) as well as pulling solrnet from Nuget for the first time - previously this same code worked with the previous distribution downloaded directly from the SolrNET site. I can see that the issue occurs in the structuremap.solrintegration project when constructing the solrnetregistry, but I'm at a loss as to 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'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

Does anyone know if something has changed or if I am doing anything incorrectly?

Thanks

JP

Was it helpful?

Solution

The SolrNet.StructureMap NuGet package was incorrectly built. I already fixed it and sent a pull request to the NuGet team. EDIT: the fix is in.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top