unitycontainer / aspnet-webapi

Unity.AspNet.WebApi package
Apache License 2.0
9 stars 11 forks source link

Relax version requirement for ASP.NET #16

Closed rcdailey closed 4 years ago

rcdailey commented 4 years ago

A project of mine uses version 5.2.6 (not 5.2.7) of this package and API compatibility is just fine. I think requiring a specific patch iteration is too prohibitive. In my case, upgrading to 5.2.7 to fulfill the dependency ended up being a nightmare. It makes much more sense to relax the version requirements.

The situation is that I upgraded to a newer version of the Unity package, which required us to upgrade Unity.AspNet.WebApi, which ended up requiring us to upgrade a bunch of our own ASP.NET packages and the nightmare continued on from there.

Note that my testing was against 5.2.6. However I suspect this will also work for 5.2.0-5.2.5 as well, hence why I dropped the 3rd component.

dnfadmin commented 4 years ago

CLA assistant check
All CLA requirements met.

rcdailey commented 4 years ago

@ENikS Thank you for accepting my PR. Is there a date for the next release that will include this change?

ENikS commented 4 years ago

@rcdailey Released

Could you help with #14 ?

gavinbarron commented 4 years ago

Interestingly this change introduces a requirement to add an assembly binding re-direct to my web.config

@rcdailey would using a floating version reference instead of the fixed version here work in your use case?

rcdailey commented 4 years ago

That wouldn't be due to this change, that would be due to mixed versions being introduced in your project. You likely have a project (outside of unity container) that is using a different version of ASP.NET. Floating version won't change the problem. The difference between floating version is that it will pick the highest version. What I have done here picks the lowest version.

Adding the binding redirect isn't really a bad thing though. Just add it to your web config and there's nothing else to do.

gavinbarron commented 4 years ago

I can assure you that the only change I made was a version bump from 5.11.1 to 5.11.2 and am using Microsoft.AspNet.WebApi 5.2.7. This change is what brings in the mixed versions for me. The binding redirect isn't a big deal, it was just a small surprise.