vsrenamer 1.1.5

Allows to rename a solution, its projects and namespaces

dotnet tool install --global vsrenamer --version 1.1.5
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local vsrenamer --version 1.1.5
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=vsrenamer&version=1.1.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Visual Studio Solution Renamer

NuGet Badge

Build Stats

Allows to rename a solution, its projects and namespaces.<br/>
Please note Preview mode is supported and enabled by default.

Get started

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]

Examples:

vsrenamer.exe --help
vsrenamer.exe -a -f Old -t New -c -w .\src --rename false --replacecontent true
vsrenamer.exe -a -f Old -t New -c -w .\src --rename true  --replacecontent false
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

NuGet Badge

dotnet tool install -g vsrenamer_gui
vsrenamer_gui.exe

<details>
<summary>Screenshots...</summary>

<img src="cmd.png" width="1073px" />
<br/>
<img src="gui.png" width="786px" />
</details>
<br/>

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 *.xaml *.xml *.json *.asax *.cshtml *.config *.js

Limitations

  • A single solution file only (.sln)
  • A single project (.csproj) per folder
  • C# projects only
  • No source version control history support

Be aware

  • 🔴 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)
  • 🔴 It's strongly recommended to perform renaming with the following two steps:
    1. Replace file content, review the changes and commit (svn, git, etc.)
    2. Rename files and folders

References

Visual Studio Solution Renamer

NuGet Badge

Build Stats

Allows to rename a solution, its projects and namespaces.<br/>
Please note Preview mode is supported and enabled by default.

Get started

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]

Examples:

vsrenamer.exe --help
vsrenamer.exe -a -f Old -t New -c -w .\src --rename false --replacecontent true
vsrenamer.exe -a -f Old -t New -c -w .\src --rename true  --replacecontent false
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

NuGet Badge

dotnet tool install -g vsrenamer_gui
vsrenamer_gui.exe

<details>
<summary>Screenshots...</summary>

<img src="cmd.png" width="1073px" />
<br/>
<img src="gui.png" width="786px" />
</details>
<br/>

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 *.xaml *.xml *.json *.asax *.cshtml *.config *.js

Limitations

  • A single solution file only (.sln)
  • A single project (.csproj) per folder
  • C# projects only
  • No source version control history support

Be aware

  • 🔴 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)
  • 🔴 It's strongly recommended to perform renaming with the following two steps:
    1. Replace file content, review the changes and commit (svn, git, etc.)
    2. Rename files and folders

References

Release Notes

Initial version

Dependencies

This package has no dependencies.

Version History

Version Downloads Last updated
1.1.5 263 10/24/2020
1.1.4 175 10/18/2020
1.1.3 199 10/18/2020
1.1.2 182 10/15/2020
1.1.1 300 10/10/2020
1.1.0 130 10/4/2020