When I write unit tests I like to use Rhino Mocks.
So when I started my first Windows Store application I naturally started with my unit tests first. When I tried to add RhinoMocks via NuGet I recieved the following error
Could not install package ‘RhinoMocks 3.6.1’. You are trying to
install this package into a project that targets
‘.NETCore,Version=v4.5’, but the package does not contain any assembly
references that are compatible with that framework. For more
information, contact the package author.
I had the same issue with Moq.
Is there a mocking framework for .NETCor,Version=v4.5?
Most mocking frameworks are based on
Reflection.Emit. UnfortunatelyReflection.Emitisn’t in WinRT. This means you can’t do dynamic proxies. (I.e. Run-time mocking). This leaves pre-generation of mocks that get referenced at compile-time. The only framework I know of is an experimental branch of Moq: https://github.com/mbrit/moqrt