我们制作了一个全新的项目,我们希望使用xUnit作为单元测试。但是,我们希望将.net 4.6.0和.net core 1.0作为目标。
我们在所有project.json中都有net460中的所有项目。据我所知,要与xUnit兼容,我们需要在dnx451中安装我们的测试项目。这是我们遇到问题的地方,因为我们至少目标460 ...
当我们在xUnit project.json中更改为dnx460时,测试在test explorer中不可见......?有原因吗?我们在某个地方有误吗?
我们使用VS2015。
这是我们的project.json
{
"version": "1.0.0-*",
"description": "SESAMEngineFacturation.Tests Class Library",
"authors": [ "christophe.mom" ],
"tags": [ "" ],
"projectUrl": "",
"licenseUrl": "",
"commands": {
"test": "xunit.runner.dnx"
},
"dependencies": {
"SESAMEngineFacturation": "",
"xunit": "2.1.0",
"xunit.runner.dnx": "2.1.0-*",
"FluentAssertions": "4.2.2"
},
"frameworks": {
"dnx451": { }
}
}
答案 0 :(得分:0)
根据这个GitHub问题:https://github.com/xunit/xunit/issues/600我想我们必须等待ASP.NET Core RC2出来才能在VSTests和Resharper单元测试资源管理器上为xunit.runner提供dnx460支持。