无法使用 Visual Studio 2013 社区运行 Xunit [英] Cannot run Xunit with Visual Studio 2013 Community
问题描述
我正在尝试让 XUnit 与 Visual Studio 2013 社区(版本 12.0.31101.00 更新 4)一起使用.
I'm trying to get XUnit to work with Visual Studio 2013 Community (Version 12.0.31101.00 Update 4).
我让 NUnit 工作,所以我认为让 XUnit 工作很简单.
I've got NUnit to work so I thought it would be simple to get XUnit to work.
代码是
using Xunit;
namespace Xunit
{
public class Class1
{
[Fact]
public void myFirstTest()
{
Assert.False(true);
}
}
}
我使用 NuGet 包管理器安装了以下内容.
I've used the NuGet Package manager to install the following.
XUnit.net 是 1.9.2 版
XUnit.net is version 1.9.2
XUnit.net: Runners 是 1.9.2 版
XUnit.net: Runners is version 1.9.2
我看过有人用 VS2012 运行 XUnit 的视频,但没有人用 2013 运行.
I've seen videos of people running XUnit with VS2012 but no one with 2013.
有什么想法吗?
推荐答案
您需要将xunit.runner.visualstudio"安装为 nuget 包,目前处于测试阶段,因此在包管理器控制台中运行:
You need to install the "xunit.runner.visualstudio" as a nuget package, currently in beta, so run in package manager console:
Install-Package xunit.runner.visualstudio -Pre
或在 GUI 中查找它,但请按照新的 文档.
or look for it in the GUI, but do select "include prerelease" as explained in the new docs.
这篇关于无法使用 Visual Studio 2013 社区运行 Xunit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!