using moq with asp.net core while unit testing
问题 I am trying to write a very simple unit test in asp.net core using moq and xunit. But I am getting a error when I run the unit test. StackTrace: at Moq.Mock 1..ctor(MockBehavior behavior, Object[] args) at Moq.Mock 1..ctor(MockBehavior behavior) at Moq.Mock`1..ctor() Could not load file or assembly 'System.Core, version=4.0.0'. Below is my code and project.json file. { "version": "0.1.0-*", "testRunner": "xunit", "dependencies": { "Moq": "4.5.22", "xunit": "2.2.0-beta2-build3300", "dotnet