See the version list below for details.
dotnet tool install --global vsrenamer --version 1.1.0
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local vsrenamer --version 1.1.0
nuke :add-package vsrenamer --version 1.1.0
Visual Studio Solution Renamer
Allows to rename a solution, its projects and namespaces.
Please note Preview mode is supported and enabled by default.
The tool is intended to be used as a global dotnet tool.
dotnet tool install -g vsrenamer
Then you can run it directly from the command line:
vsrenamer.exe -w <solution directory> [other parameters]
vsrenamer.exe --help vsrenamer.exe --workingdirectory c:\Sources\projectA\src\ --apply --from projectA --to projectAAA --solution MySolution.sln vsrenamer.exe -w c:\Sources\projectA\src\ --apply --cleanup vsrenamer.exe -w c:\Sources\projectB\src\ -a -f projectB -t projectBBB -c --projects --mask "*.csproj *.cs *.xaml" vsrenamer.exe -w c:\Sources\projectC\src\ -a -f projectC -t projectCCC -c --verbose
If you need to update a solution with ".." paths you can use the following command line:
vsrenamer.exe -w c:\Sources\projectD\src\ -a -f projectD -t projectDDD -c -m "*.sln *.csproj *.xaml *.cs *.xml" -p
Also you can install and run its GUI version
dotnet tool install -g vsrenamer_gui vsrenamer_gui.exe
Under the hood
Here is the list of actions to be done during the process of renaming
- Rename .sln file
- Rename .csproj files
- Rename parent folder of the projects
- Update their relative paths in the .sln file
- Set proper AssemblyName and RootNamespace in the .csproj files
- Replace text in files. By default, *.cs *.csproj *.xaml *.xml
- A single solution file only (.sln)
- A single project (.csproj) per folder
- C# projects only
- No source version control history support
- No backup feature
- No roll-back feature
- No proper symlinks support
- Tested with
- Microsoft Visual Studio Solution File, Format Version 12.00
- Visual Studio Version 16 (2019)
|Product||Versions Compatible and additional computed target framework versions.|
|.NET||net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed.|
|.NET Core||netcoreapp3.1 is compatible.|
This package has no dependencies.