simpleinjector / SimpleInjector

An easy, flexible, and fast Dependency Injection library that promotes best practice to steer developers towards the pit of success.
https://simpleinjector.org
MIT License
1.21k stars 154 forks source link

SimpleInjector.Integration.Web startup failed when use Microsoft.Web.Infrastructure 2.0.0 #952

Closed regionbbs closed 2 years ago

regionbbs commented 2 years ago

Hello,

I use Simple Injector with ASP.NET MVC project, and it's upgraded Microsoft.Web.Infrastructure assembly version to 2.0.0 But SimpleInjector.Integration.Web can't use 2.0.0 and reports error "Could not load file or assembly 'Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified".

Can you help to upgrade reference version of Microsoft.Web.Infrastructure to 2.0.0?

Thank you.

dotnetjunkie commented 2 years ago

The error indicates your application's config file is missing the proper binding redirect. Adding this to your config file will fix the problem.

regionbbs commented 2 years ago

I will try another approach to handle this error. Thank you.