我按照这个ASP.NET Core 1.0: hints to get started教程以及其他教程尝试在我的ASP.NET Core MVC项目中实现一些模拟工作,但是我只能得到下面的结果:
Package moq.netcore 4.4.0-beta8 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package moq.netcore 4.4.0-beta8 supports:
- dotnet (.NETPlatform,Version=v5.0)
- net35 (.NETFramework,Version=v3.5)
- net40 (.NETFramework,Version=v4.0)
- sl5 (Silverlight,Version=v5.0)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.
到目前为止有没有解决方案?
我的project.json文件:
{
"version": "1.0.0-*",
"testRunner": "xunit",
"dependencies": {
"xunit": "2.2.0-beta2-build3300",
"APP.Portal": "1.0.0-*",
"dotnet-test-xunit": "2.2.0-preview2-build1029",
"moq.netcore": "4.4.0-beta8"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
}
}
}
}
我的NuGet.config文件:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>