Visual Studio 2017 + .NET Core 2.0。我从模板中创建了一个全新的xUnit测试项目:
项目(.csproj)文件:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.3.0" />
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />
<PackageReference Include="xunit" Version="2.3.1" />
<PackageReference Include="xunit.runner.console" Version="2.3.1" />
</ItemGroup>
</Project>
测试
public class Class1
{
[Fact]
public void Test1()
{
Assert.Equal(1, 1);
}
}
每当运行或调试测试时,我会得到"Inconclusive: Test not run"。 我错过了什么?
我下载了这个示例: https://github.com/xunit/xunit.integration 构建this解决方案时,我收到以下错误:
Visual Studio版本:Error MSB3073 The command "dotnet "C:\Users\supersuper.nuget\packages\xunit.runner.console\2.3.1\build..\tools\netcoreapp2.0\xunit.console.dll" "C:\Users\supersuper\Desktop\xunit.integration-master\console\v2x_netcoreapp20\bin\Debug\netcoreapp2.0\v2x_netcoreapp20.dll"" exited with code 1. v2x_netcoreapp20 C:\Users\supersuper\Desktop\xunit.integration-master\console\v2x_netcoreapp20\v2x_netcoreapp20.csproj 13
dotnet --version
2.0.2
是因为ReSharper吗?