-
Notifications
You must be signed in to change notification settings - Fork 33
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
Dynamic Proxy integration 4.3.0 doesn't work with Castle.Core 4.2.1 #25
Comments
Can you provide a bit more info here? Is there an error message? Some reproduction you can show to illustrate the problem? |
I'm getting this exception for
I'm using Castle.Core v4.2.1 as shown in the image above. |
You may need to add an assembly binding redirect to your app.config. NuGet sometimes misses that. |
I've already |
Even adding this didn't help: <runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.1.0" newVersion="4.2.1.0" />
</dependentAssembly>
</assemblyBinding>
</runtime> Getting the exception on runtime, it's not a build problem. So, it may not be related to nuget. |
Binding redirects are a runtime thing (note the Is there a small repro project I can see? |
Also, have you tried clearing cached items like the .vs folder? That can sometimes help. |
Yes, I cleared it. I also published it and run under IIS to see the difference. Result is same.
No, but nice idea, I can try with a simpler test project when I have time. |
I was able to repro this in a small console app. Unclear why it's popping up yet or what to do about it, but at least I see it. |
OK, it turns out this is a Castle.Core problem. TL;DR: They wanted to switch from changing their assembly version strategy so it's pinned at 4.0.0.0... but they did that after having released 4.1.0.0. As of Castle.Core 4.2.0, the Castle.Core package version changes but the assembly version doesn't. And they chose to go backwards to 4.0.0. assembly version instead of stopping at 4.1.0.0 and pinning there... or restarting at 5.0.0.0.
What a nightmare. I guess the right way to handle this is to update to 4.2.1 here so the bound assembly version lines up...? This is going to be a nightmare of trickle down problems. Sigh. But I can't see any way around it. Really wish they hadn't done that without incrementing the major version. |
OMG! Then upgrading dependency to 4.2.1 seems the best way. |
I released v4.4.0 of Autofac.Extras.DynamicProxy that uses Castle.Core 4.2.1. I also added docs about this issue. That's the best I can do from this end. For folks hitting this in the future, I recommend taking it up with the Castle.Core crew. This is out of the control of Autofac. |
Thank you @tillig for fast reaction. I just tested and it worked :) |
Nice work @tillig. I've updated |
No description provided.
The text was updated successfully, but these errors were encountered: