I followed this ASP.NET Core 1.0: hints to get started tutorial and others trying to get some mocking working in my ASP.NET Core MVC project. But I only get this:
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.
Is there any solution so far?
My 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"
}
}
}
}
}
My 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>
You could try adding an import for a supported framework.
Something like:
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8"
],
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
}
}
}
EDIT: I found this post useful for understanding frameworks and imports in .net core - https://blogs.msdn.microsoft.com/cesardelatorre/2016/06/28/running-net-core-apps-on-multiple-frameworks-and-what-the-target-framework-monikers-tfms-are-about/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With