3
我正在嘗試在dotnet cli項目上設置xunit測試。我意識到這是非常早期的支持。現在,我無法恢復軟件包。下面是我project.json
dotnet cli項目上的xunit
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002392"
},
"xunit": "2.1.0-*",
"dotnet-test-xunit": "1.0.0-dev-*"
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"portable-net45+wp80+win8+wpa81+dnxcore50"
]
}
},
"testRunner": "dotnet-test-xunit"
}
運行dotnet restore
我收到以下錯誤後:
Package xunit.assert 2.1.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package xunit.assert 2.1.0 supports:
- dotnet (.NETPlatform,Version=v5.0)
- portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
Package xunit.runner.reporters 2.1.0 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package xunit.runner.reporters 2.1.0 supports:
- dnx451 (DNX,Version=v4.5.1)
- dotnet (.NETPlatform,Version=v5.0)
- net45 (.NETFramework,Version=v4.5)
Package Microsoft.Extensions.Logging.Abstractions 1.0.0-rc2-16040 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.Extensions.Logging.Abstractions 1.0.0-rc2-16040 supports:
- dotnet5.4 (.NETPlatform,Version=v5.4)
- net451 (.NETFramework,Version=v4.5.1)
- netcore50 (.NETCore,Version=v5.0)
Package Microsoft.DiaSymReader 1.0.6 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.DiaSymReader 1.0.6 supports:
- net20 (.NETFramework,Version=v2.0)
- portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7)
Package Microsoft.Extensions.FileSystemGlobbing 1.0.0-rc2-15996 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package Microsoft.Extensions.FileSystemGlobbing 1.0.0-rc2-15996 supports:
- dotnet5.4 (.NETPlatform,Version=v5.4)
- net451 (.NETFramework,Version=v4.5.1)
One or more packages are incompatible with .NETCoreApp,Version=v1.0.
Feeds used:
https://www.myget.org/F/dotnet-core/api/v3/index.json
https://api.nuget.org/v3/index.json
https://www.myget.org/F/coreclr-xunit/api/v2
https://www.myget.org/F/dotnet-cli/