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

Exception after upgrade of Catle.Core to 4.1.0 #377

Closed
tmm360 opened this issue Jun 17, 2017 · 2 comments
Closed

Exception after upgrade of Catle.Core to 4.1.0 #377

tmm360 opened this issue Jun 17, 2017 · 2 comments

Comments

@tmm360
Copy link

tmm360 commented Jun 17, 2017

In my project I use Castle.Core, and after to have updated dependency to 4.1.0, I receive this exception from Moq in my tests (italian message):

Message: System.TypeInitializationException : L'inizializzatore di tipo di 'Moq.Mock`1' ha generato un'eccezione.
---- System.TypeInitializationException : L'inizializzatore di tipo di 'Moq.Proxy.CastleProxyFactory' ha generato un'eccezione.
-------- System.IO.FileLoadException : Non è stato possibile caricare il file o l'assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' o una delle relative dipendenze. La definizione di manifesto dell'assembly specificato non corrisponde al riferimento all'assembly. (Eccezione da HRESULT: 0x80131040)
@stakx
Copy link
Contributor

stakx commented Jun 17, 2017

The latest published version of Moq is built against Castle.Core 4.0.0. If you replaced that dependency with version 4.1.0, you probably need to set up an assembly binding redirect in Web.config / App.config. Or you wait for the next version of Moq (just around the corner) which will use Castle.Core 4.1.0.

@stakx
Copy link
Contributor

stakx commented Jun 18, 2017

Moq 4.7.49 is now available. It targets Castle.Core 4.1.0 as well. This problem should be resolved once you upgrade to Moq 4.7.49.

@stakx stakx closed this as completed Jun 18, 2017
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