Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple Injector build failure with ncrunch #23

Closed
bapti opened this issue Feb 16, 2015 · 3 comments
Closed

Simple Injector build failure with ncrunch #23

bapti opened this issue Feb 16, 2015 · 3 comments

Comments

@bapti
Copy link

bapti commented Feb 16, 2015

I get the following error when running the tests under nCrunch. To fix I copied the simple injector common service locator implementation into a local class rather than use the packaged version as the packaged version uses 1.0.0.0 instead of 1.3.0.0

Assembly 'MediatR, Version=1.0.0.0, 
Culture=neutral, PublicKeyToken=null' uses 'Microsoft.Practices.ServiceLocation, 
Version=1.3.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35' which has a higher version than referenced assembly 'Microsoft.Practices.ServiceLocation, 
Version=1.0.0.0, Culture=neutral, 
PublicKeyToken=31bf3856ad364e35'

If you'd like a merge request let me know, feels like the proper fix here is to get simple injector to update their CSL package though.

Thoughts?

Thanks
Neil

@jbogard
Copy link
Owner

jbogard commented Feb 16, 2015

This should be able to be addressed via a binding redirect in your app:

<runtime>
  <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>
</runtime>

@bapti
Copy link
Author

bapti commented Feb 16, 2015

Good idea, I've just tried it however it still emits the same error. Perhaps it's a quirk of ncrunch.

@jbogard
Copy link
Owner

jbogard commented Apr 24, 2015

This will go away in 2.0 when I remove the dependency on CSL.

@jbogard jbogard closed this as completed Apr 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants