Skip to content
| Marketplace
Sign in
Visual Studio>Tools>NUnit Migrator
NUnit Migrator

NUnit Migrator

Marcin Wachulski

|
1,865 installs
| (0) | Free
Helps transform NUnit v2 to NUnit v3. It consists of a set of Roslyn analyzers and code fixers.
Download

This VS extension is deprecated. Please use a nuget library instead: https://www.nuget.org/packages/NUnit.Migrator

This is due to VSIX limitation of Roslyn analyzers that prevents from finding all breaking changes at once.

Have NUnit v2 and want v3?

This little extension aims at helping you transform your existing unit tests from NUnit v2 to v3 of the framework. Here are the main time savers:

  • ExpectedException and exception related TestCases are automatically transformed to v3
  • Various assertions and constraints APIs are swapped
  • Renamings to v3 equivalents
  • Other problems detected and reported as warnings or errors (no automatic migrations though)

How it works

You normally do it in the following steps:

  1. Install the extension in your VS.
  2. Open the project and go to the Error List.
  3. You should see a list of errors/warnings with ids like NU2M01. This is not the case. You need to open a file first to get it analyzed. And this is troublesome, since you'd like to find all breaking changes automatically. You're forced to make assumptions and this reduces benefits significantly. A better option is to use the nuget package.
  4. Navigate to one and check if a code fix has been provided (in most cases it has).
  5. Transform as much as you can with code fixes. Other adjustments you need to do manually.
  6. Update nunit library to v3.
  7. Compile and run unit tests. Some may fail. At least the automation removed the boilerplate transformations from your shoulder.

More

More about the utility and its full capabilities can be found here: https://github.com/wachulski/nunit-migrator/blob/master/README.md

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft