3

When I'm starting my project (based on Project Orleans), it comes out that a weird warning is thrown by a missing reference:

 [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 doesn't come on Unity Nuget package and I can't find it anywhere! This are causing some weird runtime behaviours on my app.

I'm using latest Unity from nuget. Attached are some screenshot that proves the dependency (ILSpy) and the project reference + Nuget package manager screens on VS.

Evidences

Is this reference really necessary? How can I get rid of it?

Thanks! Really appreciate the help.

Gutemberg Ribeiro
  • 1,533
  • 1
  • 21
  • 45
  • I was stucked this issue. Take a look to [this answer](http://stackoverflow.com/a/28789578/2014112) !! – KnowGe Mar 27 '16 at 20:07

1 Answers1

5

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>

Any way. The following should be your missing package right?

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

Juan M. Elosegui
  • 6,471
  • 5
  • 35
  • 48