I've created a Testproject for my Windows 8.1 Class Library. In the TestInitialize function a like to fake a Service.
A.Fake<IService>();
But I get this exception:
The type initializer for 'FakeItEasy.Core.FakeScope' threw an exception.
"Could not load file or assembly 'System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e'
or one of its dependencies. The system cannot find the file specified.":
"System.Core, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e"
at FakeItEasy.Core.FakeScope.get_Current()
at FakeItEasy.RootModule.<RegisterDependencies>b__2(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1`1.<Register>b__0(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType)
at FakeItEasy.ServiceLocator.Resolve[T]()
at FakeItEasy.RootModule.<RegisterDependencies>b__3(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1`1.<Register>b__0(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType)
at FakeItEasy.ServiceLocator.Resolve[T]()
at FakeItEasy.RootModule.<RegisterDependencies>b__18(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1`1.<Register>b__0(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType)
at FakeItEasy.ServiceLocator.Resolve[T]()
at FakeItEasy.RootModule.<RegisterDependencies>b__17(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.<>c__DisplayClass1`1.<Register>b__0(DictionaryContainer c)
at FakeItEasy.IoC.DictionaryContainer.Resolve(Type componentType)
at FakeItEasy.ServiceLocator.Resolve[T]()
at FakeItEasy.A.get_FakeCreator()
at FakeItEasy.A.Fake[T]()
When I try the same but using NUnit instead of MS-Test everthing work fine.
What do I need to change that FakeItEasy is working with MS-Test?
I'm using FakeItEasy 1.23.0.0