Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Unity.Wcf 5.11.1 not working with Unity 5.11.10 #9

@Gotcab

Description

@Gotcab

I'm trying to use lastest versions of Unity.Wcf and Unity together but I get multiple errors.
Here is my Stacktrace:

[FileLoadException: Could not load file or assembly 'Unity.Abstractions, Version=5.11.1.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)]
   DSF.IES.Pilotage.Service.Factory.CustomServiceHostFactory.CreateServiceHost(Type serviceType, Uri[] baseAddresses) +0
   System.ServiceModel.HostingManager.CreateService(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +2086
   System.ServiceModel.HostingManager.ActivateService(ServiceActivationInfo serviceActivationInfo, EventTraceActivity eventTraceActivity) +65
   System.ServiceModel.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath, EventTraceActivity eventTraceActivity) +738

[ServiceActivationException: The service '/ServiceAnnuaireEntreprise.svc' cannot be activated due to an exception during compilation.  The exception message is: Could not load file or assembly 'Unity.Abstractions, Version=5.11.1.0, Culture=neutral, PublicKeyToken=489b6accfaf20ef0' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040).]
   System.Runtime.AsyncResult.End(IAsyncResult result) +576
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +240
   System.ServiceModel.Activation.ServiceHttpModule.EndProcessRequest(IAsyncResult ar) +39
   System.Web.AsyncEventExecutionStep.InvokeEndHandler(IAsyncResult ar) +225
   System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +159
   System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +630
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +213
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +131

It seems to me that Unity.Wcf absolutely wants a specific version of Unity.Abstractions but I already have Unity.Abstractions 5.11.7 via the Unity Package.

I can't go to a lower version since other dependencies in my project also have dependencies on Unity 5.11.10.
I know about BindingRedirects but it does not seem to work:

<dependentAssembly>
	<assemblyIdentity name="Unity.Container" publicKeyToken="489B6ACCFAF20EF0" culture="neutral"/>
	<bindingRedirect oldVersion="0.0.0.0-5.11.11.0" newVersion="5.11.11.0"/>
</dependentAssembly>
<dependentAssembly>
	<assemblyIdentity name="Unity.Abstractions" publicKeyToken="489B6ACCFAF20EF0" culture="neutral"/>
	<bindingRedirect oldVersion="0.0.0.0-5.11.7.0" newVersion="5.11.7.0"/>
</dependentAssembly>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions