0

I get the following error when setting up a mock using Moq using Moq 4.7.145 and Castle.Core 4.2.1

{"Could not load file or assembly 'Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc' or one of its dependencies. The system cannot find the file specified.":"Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc"}

   at Moq.Proxy.CastleProxyFactory.get_Instance()
   at Moq.Mock.ThrowIfSetupMethodNotVisibleToProxyFactory(MethodInfo method) in C:\projects\moq4\Source\Mock.cs:line 823
   at Moq.Mock.<>c__DisplayClass67_0`2.<Setup>b__0() in C:\projects\moq4\Source\Mock.cs:line 481
2
  • Remove then re-add the Moq package there may be a conflict. Also check config file for any binding redirects
    – Nkosi
    Commented Nov 9, 2017 at 16:39
  • 2
    What is the question exactly? Commented Nov 9, 2017 at 16:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.