【发布时间】:2016-06-30 10:14:43
【问题描述】:
我希望为 netstandard1.6 库使用测试框架。我尝试关注和编辑Getting started with xUnit.net (.NET Core / ASP.NET Core),但没有成功。按照 xUnit 的教程使用 VS 2015 Update 3 RTM 上的 dotnetcore lib 和我的 project.json 文件来重现错误。
项目.json:
{
"version": "1.0.0-*",
"testRunner": "xunit",
"dependencies": {
"NETStandard.Library": "1.6.0",
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029"
},
"frameworks": {
"netstandard1.6": {
"imports": "dnxcore50"
}
},
"runtimes": {
"win10-arm": {},
"win10-arm-aot": {},
"win10-x86": {},
"win10-x86-aot": {},
"win10-x64": {},
"win10-x64-aot": {}
}
}
错误:
Severity Code Description
Error NU1002 The dependency dotnet-test-xunit 2.2.0-preview2-build1029 does not support framework .NETStandard,Version=v1.0
我可以降级到 dotnet-test-xunit 2.2.0-preview2-build1029 支持的 .netstandard 版本吗?是否有任何已知的解决方法可以将 xUnit 与它一起使用?
由于我对 project.json 和 dotnetcore 有点陌生,我可能会错过一些有用的东西。
【问题讨论】: