Upgrading xunit.extensions

The xunit.extensions package has been deprecated from xUnit.net v2. This page will help you find classes that you may now be missing.

Classes moved into core xUnit.net

The classes here are part of the core unit testing framework now, and you will be able to get references to them by importing the xunit or xunit.core NuGet packages.

Class New Location
DataAttribute Moved to Xunit.Sdk namespace.
InlineDataAttribute Moved to Xunit namespace.
PropertyData Renamed to Xunit.MemberData, and enhanced to support theory data from properties, fields, and methods.
TheoryAttribute Moved to Xunit namespace.

Classes moved to samples

The classes here have been moved into sample projects. You can copy the code from the sample to your own project.

Class Sample
AssumeIdentityAttribute See the AssumeIdentity sample.
AutoRollbackAttribute A sample will be forthcoming soon.
Clock
FreezeClockAttribute
A sample will be forthcoming soon.
DataAdapterDataAttribute
ExcelDataAttribute
OleDbDataAttribute
SqlServerDataAttribute
OleDbDataAttribute
See the ExcelData sample. (This sample only covers how to do Excel data, but the technique can adapted to many types of database-based data sources.)
TraceAttribute See the TestOutputExample sample.

Classes deprecated

These classes have been removed from xUnit.net v2.

Class Reason
Assertions
TestClass
These classes were removed because they used inheritance (from TestClass) to provide a way to write assertion extensions. In xUnit.net v2, the Assert class is available in source form in the xunit.assert.source NuGet package, and is a partial class so that you can write your own methods that belong to it.
Copyright © 2017 .NET Foundation. Contributions welcomed at https://github.com/xunit/xunit.github.io.