This topic applies to .NET Core Tools RC4. For the .NET Core Tools Preview 2 documentation, see the .NET Core Tools section.
dotnet-migrate -- Migrates a Preview 2 .NET Core project to RC4 .NET Core project
dotnet migrate [--help] [--template-file]
[--skip-project-references] [--report-file] [--format-report-file-json]
dotnet migrate command will migrate a valid Preview 2
project.json based project to a valid RC4
By default, the command will migrate the root project and any project references that the root project contains. This behavior
can be disabled using the
--skip-project-references option at runtime.
Migration can be done on either:
- A single project by specifying the
project.jsonfile to migrate
- All of the directories specified in the
global.jsonfile by passing in a path to the
- On all sub-directories of the given directory recursively
The migrate command will keep the migrated
project.json file inside a
backup directory which it will create if it doesn't
exist. This can be overriden using the
By default, the migration operation will output the state of the migration process to standard output (STDOUT). If you use the
--report-file option, that output will also be saved to a file that you specify.
As of RC4, the
dotnet migrate command only supports valid Preview 2
project.json files. This means that you cannot
use it to migrate old DNX or Preview 1
project.json files directly to csproj; you first need to migrate them to Preview 2 project.json files and then
to csproj files. In the future, we will add support for Preview 1 projects.
Prints out a short help for the command.
Template csproj file to use for migration. By default, the same template as the one dropped by
dotnet new will be used.
The version of the sdk package that will be referenced in the migrated app. The default is the version of the sdk in dotnet new.
The path to the xproj file to use. Required when there is more than one xproj in a project directory.
Skip migrating project references. By default project references are migrated recursively.
Output migration report to a file in addition to the console.
Output migration report file as json rather than user messages.
Skip moving project.json, global.json, and *.xproj to a
backup directory after successful migration.
Migrate a project in the current directory and all of its project to project dependencies:
Migrate all projects that
global.json file points to:
dotnet migrate path/to/global.json
Migrate only the current project and no project to project dependencies and use a specific SDK version:
dotnet migrate -s -v 1.0.0-preview4