3

I was working on Azure functions with.Net f/w and my unit test cases were running fine. Unit test cases were using Rhino Mock. After migrating it to.Net Core, these test cases are giving runtime exceptions. Some of the expceptions being :

MissingMethodException: Method not found:

DurableOrchestrationClientBase durableOrchestrationClientBaseMock = MockRepository.Mock<DurableOrchestrationClientBase>();

Method not found: 'System.Reflection.Emit.AssemblyBuilder System.AppDomain.DefineDynamicAssembly(System.Reflection.AssemblyName, System.Reflection.Emit.AssemblyBuilderAccess)'.'

var helper = MockRepository.Mock<IDBHelper>();

My question is "Is Rhino mocks compatible with .Net Core?"

Tarun Bhatt
  • 727
  • 2
  • 8
  • 28
  • 4
    No. It is only compatible with the .NET Framework. And I don't believe Rhino Mocks is under development any more. You can see from the [github repo](https://github.com/ayende/rhino-mocks) that it hasn't been updated for a few years, I switched to the [Moq framework](https://github.com/moq/moq) instead – Simply Ged Sep 04 '18 at 05:27
  • 1
    Thanks @SimplyGed. Had a look at the Github. Problem I am facing is my CI CD pipeline supports only Rhino and its a different team (and a difficult one) – Tarun Bhatt Sep 04 '18 at 05:37
  • 1
    I have good news regarding this. I spent the past 2 days working on migrating support for Rhino mocks not only to .Net Core but also to .Net Standard. When the repo owner approves my changes, that will be released – LateKnight 1 Aug 04 '20 at 23:16
  • 2
    @LateKnight1 what is the status of this? Looks like 3.6.1 still supports .Net Framework only? – Ama Sep 15 '21 at 19:41
  • @SimplyGed `It is only compatible with the .NET Framework` Someone ought to post this as an answer. I think you ought to be given first chance! :-) – Grimm The Opiner Aug 10 '23 at 14:45

0 Answers0