Unity Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version = 1.2.0.0

When I start my project (based on Project Orleans), it turns out that a strange warning is being triggered by a missing link:

 [2015-07-26 20:03:06.970 GMT 6 INFO 100000 AssemblyLoader.Client ] User assembly ignored: C:\Users\Gutemberg\Documents\Visual Studio 2015\Projects\PI - Switch (MS)\PI.Switch.Gateway.Host\bin\Debug\Microsoft.Practices.Unity.dll
* An assembly dependency [Microsoft.Practices.ServiceLocation, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, Could not load file or assembly 'Microsoft.Practices.ServiceLocation, Version=1.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.] could not be loaded: 0   

      

Microsoft.Practices.ServiceLocation is not included in the Unity Nuget package and I can't find it anywhere! This causes some strange behavior while the application is running.

I am using the latest Unity from nuget. Attached are some screenshots that prove the dependency (ILSpy) and project + Nuget references for the package manager on VS.

Evidences

Is this link really needed? How can I get rid of it?

Thank! I really appreciate the help.

+3


source to share


1 answer


Try to get a newer version and then redirect to that specific version.

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <dependentAssembly>
        <assemblyIdentity name="Microsoft.Practices.ServiceLocation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-1.3.0.0" newVersion="1.3.0.0" />
    </dependentAssembly>
</assemblyBinding>

      



Anyway. Below is your missing package?

https://www.nuget.org/packages/CommonServiceLocator/1.2.0

+4


source







All Articles