-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
I just upgraded to Castle Core v4.2.0 whilst using Moq v4.7.127 and I am getting an assembly binding error #461
Comments
This is because Castle Core changed the AssemblyVersion attribute to only include major version numbers only so that we can avoid assembly binding errors with future releases/upgrades of Castle Core. Why is the assembly binding error happening then?This is because Moq have to release a version compiled against the new AssemblyVersion strategy, they are on it! :) What do I do in the meantime? I want Castle Core bug fixes.You can apply this following assembly binding redirect in your App.config.
Are you using Castle Core features directly?If not and you are using the latest version of Visual Studio (15.3.5) then you should probably remove the NuGet reference altogether along with it's assembly bindings. This means Castle Core becomes a Are you guys versioning properly at all?Yes we are, we just use the AssemblyFileVersion instead. I am still having issues.Please post to this issue and we will try to help you. |
An updated Moq version built against Castle Core 4.2.0 has been ready since Saturday, unfortunately we're blocked from pushing it to NuGet by appveyor/ci#1825. Will report here again once we've successfully published the update. |
@stakx - you know there is a workaround outlined on there support forum. So that you can publish while they fix it. |
Moq 4.7.137 has just been published on NuGet. It references Castle Core 4.2.0, so once you upgrade, any version conflicts should resolve itself. If anyone still has trouble, please let us know here. |
(I realise it's a little soon to close this notification, but given that the most likely way to cause this problem is to just press something like a "update everything to the latest version" button, this should really be solved now. Thanks again for posting this!) |
No problem! :) |
Starting 4.8 Moq just doesn't work on any of build servers with this
I understand that reasons are somewhere there - NuGets, Versions, BindingRedirects, Microsoft way of versioning etc. etc. ... but the fact is - this happens each time I touch Moq. |
@salixzs: You appear to be using an older version of Moq. Why not try with the latest one? We've since shed quite a few package dependencies, and both Moq and Castle.Core have migrated to a different assembly versioning approach which should greatly help in avoiding assembly binding errors. Yes, I'm tired of this, too. I've found however that using the latest tooling and using SDK-style project file format helps a lot. |
I just upgraded Castle.Core from v4.1.1 to v4.2.0 whilst using Moq and got an assembly binding error. Why is this happening?
The text was updated successfully, but these errors were encountered: