Support for UWP projects in Visual Studio is currently broken in 2.3 beta 2. There was insufficient time to resolve this issue. UWP users are advised to continue to use 2.3 beta 1 or earlier. You can track the issue here.
xunit.analyzers
project is automatically included when you add a
reference to the xunit
NuGet package. If you would prefer not to include
the analyzers, please reference the xunit.core
NuGet package instead (and
xunit.assert
if you use the built-in assertions).
-nobuild
switch,
the minimum version of the xunit
(and xunit.core
) NuGet packages
is 2.3 beta 2.
-nobuild
switch was added, which allows tests to run without being re-built.
This should improve compatibility with projects which cannot be built with dotnet msbuild
,
as well as improving startup performance when the project has already been built.
-usemsbuild
switch was added, which allows all interaction with the project
to be done via msbuild.exe
instead of dotnet msbuild
. Most users should
not need this switch. It is assumed that msbuild.exe
v15 is available on the
PATH
.
--framework/-f
, --configuration/-c
,
--fx-version
, and --no-build
are now supported for feature
parity with dotnet test
. The preferred names (-framework
,
-configuration
, -fxversion
, and -nobuild
) are
the only ones documented in dotnet xunit -?
.
mono
(or mono64
) as appropriate on Linux or
OS X. It is assumed that Mono is available via the PATH
.
-namespace
) could not be specified more than once.
xunit.runner.console
NuGet package
has been changed; notably, the path to the net452
executables has moved from
tools\
to tools\net452\
. You will need to update any paths which
previously hard-coded this path.
xunit.runner.console
NuGet package. Since this has to be invoked via the undocumented dotnet exec
,
this is here for advanced scenarios only. Most users should continue to rely on
dotnet xunit
to invoke the console runner, as described in our
Getting Started page
for .NET Core.
xunit.runner.msbuild
NuGet package
has been changed; notably, the names of the MSBuild runner DLLs now include the
target platform. This means if you had a hard-coded path to xunit.runner.msbuild.dll
,
this will need to be replaced with xunit.runner.msbuild.net452.dll
.
msbuild
vs. dotnet msbuild
. Note: unlike dotnet xunit
, the desktop CLR runner
can only run desktop CLR test projects, and the .NET Core runner can only run .NET Core
test projects.
XunitTestCaseRunner
has several new override methods that make it easier to
extend specific parts of the pipeline (creating tests, the test runner, and supplementing
the before/after attributes for a test).
XunitTestFrameworkDiscoverer
has exposed the mapping between Fact
-derived
attributes and the discoverer that is used to find them, allowing the user easier access to
the cache (as well as allowing them to pre-seed the cache).
For information on using xUnit.net from within Visual Studio, see Running tests with Visual Studio in the Getting Started documentation.
NoAutoReporters
switch can be set in the RunSettings
file
to disable environmental reporters (like TeamCity and AppVeyor).