ProjectRenamerCloner 3.0.0
dotnet tool install --global ProjectRenamerCloner --version 3.0.0
dotnet new tool-manifest
dotnet tool install --local ProjectRenamerCloner --version 3.0.0
#tool dotnet:?package=ProjectRenamerCloner&version=3.0.0
nuke :add-package ProjectRenamerCloner --version 3.0.0
Project Renamer Cloner
A .NET global tool and standalone executable that renames and clones entire projects in a single step. Supports .NET 10 through .NET Framework 4.6.2. It performs case-aware find-and-replace across file contents, file names, and directory names โ automatically generating 12 naming convention variants from a single PascalCase input. Designed for ABP.io, ASP.NET Core, Angular, React Native, Blazor, and any multi-project .NET solution.
๐ Detailed Usage Guide ยท ๐ Changelog
Features
Automatic Case Variant Generation
Enter a PascalCase name and the tool builds every common naming convention automatically:
| Convention | Old | New |
|---|---|---|
| PascalCase | BookStore |
MusicShop |
| camelCase | bookStore |
musicShop |
| lowercase | bookstore |
musicshop |
| UPPERCASE | BOOKSTORE |
MUSICSHOP |
| kebab-case | book-store |
music-shop |
| UPPER-KEBAB | BOOK-STORE |
MUSIC-SHOP |
| snake_case | book_store |
music_shop |
| SCREAMING_SNAKE | BOOK_STORE |
MUSIC_SHOP |
| dot.case | book.store |
music.shop |
| Pascal.Dot | Book.Store |
Music.Shop |
| Title Case | Book Store |
Music Shop |
| lower space | book store |
music shop |
Every occurrence inside namespaces, class names, using directives, string literals, comments, configuration files, file names, and directory names is replaced.
8-Step Pipeline
| Step | What it does |
|---|---|
| 1. Clean | Deletes bin, obj, node_modules, .angular, .next, .nuxt, .turbo, .cache, .parcel-cache, coverage, Pods, and frontend lock files |
| 2. Content Replace | Replaces all case variants inside 60+ file types with a live progress bar |
| 3. File Rename | Renames files containing the old name with a live progress bar |
| 4. Dir Rename | Renames directories leaf-first to avoid path conflicts, with a live progress bar |
| 5. Port Randomize | Randomizes applicationUrl ports and sslPort in launchSettings.json. Also detects ports in web.config, *.csproj.user, and applicationhost.config (IIS Express) |
| 6. Port Propagate | Propagates port changes to all configuration files โ URL patterns, property patterns, Docker compose mappings, and IIS Express bindings |
| 7. GUID Regenerate | Regenerates .sln instance GUIDs (preserves type GUIDs), syncs <ProjectGuid> in .csproj, handles .slnx, and regenerates <UserSecretsId> |
| 8. Package Restore | Runs dotnet restore and auto-detects npm / yarn / pnpm / bun install |
Supported File Types
<details> <summary>60+ extensions across all major ecosystems (click to expand)</summary>
- .NET / ABP โ
.cs,.csproj,.props,.targets,.sln,.slnx,.razor,.cshtml,.vb,.fs,.fsproj,.vbproj,.resx,.xaml,.axaml - Config โ
.json,.jsonc,.config,.xml,.yml,.yaml,.toml,.ini,.runsettings,.ruleset,.DotSettings - Web โ
.html,.htm,.css,.scss,.sass,.less - JS / TS โ
.js,.jsx,.ts,.tsx,.mjs,.cjs - Frameworks โ
.vue,.svelte,.component,.service,.module,.directive,.pipe - Android โ
.java,.kt,.kts,.gradle - iOS โ
.swift,.m,.h,.plist,.pbxproj,.xcscheme,.xcworkspacedata,.storyboard,.xib,.strings,.entitlements,.podspec - Build / CI โ
.dockerfile,.env,.cmd,.bat,.ps1,.sh - Data โ
.sql,.proto,.graphql,.gql - Docs โ
.md,.txt,.editorconfig,.gitignore,.dockerignore,.gitattributes - HTTP โ
.http,.rest - Extensionless โ
Dockerfile,Podfile,Gemfile,Makefile,Procfile,.browserslistrc,.babelrc,.eslintrc,.prettierrc
</details>
Backup & Restore
- Pre-rename backup โ before making any changes, the tool offers to create a backup in
__renamer_backup__/ - One-key restore โ on the next run, if a backup is detected, the tool offers to restore all files to their pre-rename state
- Smart exclusions โ backup skips
bin,obj,node_modules,.git, and other cache folders to keep backup size small
Safety
- Confirmation prompt โ displays the full replacement map and asks
Y/Nbefore making any changes - Self-exclusion โ the running executable is excluded from processing
- Type GUIDs preserved โ only project instance GUIDs are regenerated;
.slntype GUIDs (C#,F#,VB,Solution Folder, etc.) are never touched - Lock files deleted, not modified โ
package-lock.json,yarn.lock,pnpm-lock.yaml,bun.lockbare removed before content replacement to avoid hash corruption, then regenerated during package restore - Longest-first replacement โ replacements are sorted by key length descending to prevent partial-match collisions
- Consistent port mapping โ the same original port is always mapped to the same new port across all files
- Port deduplication โ randomized ports are tracked in a
HashSetso no two profiles share the same port - Error counting โ errors are counted and reported in the summary, not silently swallowed
Installation
Option 1 โ .NET Global Tool (recommended)
dotnet tool install -g ProjectRenamerCloner
Then run from any directory:
project-renamer
Option 2 โ Single-File EXE
Download the latest release and place the executable in the root of the project you want to rename.
Option 3 โ Build from Source
git clone https://github.com/winproxy/VSProjectRenamer.git
cd ProjectRenamerCloner
# global tool
dotnet pack
dotnet tool install -g --add-source ./nupkg ProjectRenamerCloner
# single-file exe
dotnet publish -p:PublishProfile=singlefile
Usage
1. Open a terminal in the root of the project you want to rename.
2. Run the tool:
project-renamer
3. Follow the interactive prompts:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PROJECT RENAMER CLONER โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Old Project Name (required): BookStore
New Project Name (required): MusicShop
Key1 OLD (optional): Acme
Key1 NEW (optional): Contoso
Key2 OLD (optional):
Key2 NEW (optional):
Replacements:
BookStore โ MusicShop
bookStore โ musicShop
bookstore โ musicshop
BOOKSTORE โ MUSICSHOP
book-store โ music-shop
BOOK-STORE โ MUSIC-SHOP
book_store โ music_shop
BOOK_STORE โ MUSIC_SHOP
book.store โ music.shop
Book.Store โ Music.Shop
Book Store โ Music Shop
book store โ music shop
Acme โ Contoso
Proceed with rename? (Y/N): Y
4. Watch the progress:
[1/8] Cleaning build outputs, caches & lock files...
[2/8] Replacing file contents... (1842 files scanned)
Content [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 67% (412/615) src\MusicShop.Application\Services\OrderService.cs
[3/8] Renaming files...
Files [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 100% (1842/1842)
[4/8] Renaming directories (leaf-first)...
Dirs [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 100% (58/58)
[5/8] Randomizing application ports...
[6/8] Propagating port changes to configuration files...
:5000 โ :5234
:5001 โ :7189
:44300 โ :44352
Ports [โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ] 100% (615/615)
[7/8] Regenerating GUIDs & UserSecretsId...
[8/8] Restoring packages...
dotnet restore
npm install โ angular
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PROJECT CLONE COMPLETED โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Files modified: 312
Files renamed: 47
Dirs renamed: 12
Ports remapped: 3
Elapsed: 00:08.42
Typical Workflows
ABP.io Projects
ABP solutions follow a CompanyName.ProjectName convention. Enter the project name part and use Key1 for the company prefix:
Old Project Name: BookStore
New Project Name: MusicShop
Key1 OLD: Acme
Key1 NEW: Contoso
Result: Acme.BookStore.Domain โ Contoso.MusicShop.Domain everywhere.
Cloning a Template
- Copy your template solution into a new folder.
- Open a terminal in the new folder.
- Run
project-renamer, enter the template name as Old and your real project name as New. - The tool renames everything, randomizes ports (so both projects can run side-by-side), regenerates GUIDs, and restores packages.
Extra Replacements
Use Key1 and Key2 for arbitrary exact-match replacements beyond the auto-generated case variants:
Key1 OLD: my-old-database
Key1 NEW: my-new-database
Key2 OLD: sk_old_stripe_key
Key2 NEW: sk_new_stripe_key
Requirements
As a .NET Global Tool
- .NET 6 SDK or later (supports .NET 6, 7, 8, 9, 10)
- Optional: Node.js / Bun (for frontend package restore)
As a Standalone EXE
- .NET Framework 4.6.2, 4.7.2, or 4.8 โ no SDK required, runs on any Windows machine with the corresponding .NET Framework installed
- .NET 6 โ 10 โ self-contained publish available, no runtime required
Supported Target Frameworks
| Framework | Global Tool | Standalone EXE |
|---|---|---|
| .NET 10 | โ | โ |
| .NET 9 | โ | โ |
| .NET 8 | โ | โ |
| .NET 7 | โ | โ |
| .NET 6 | โ | โ |
| .NET Framework 4.8 | โ | โ |
| .NET Framework 4.7.2 | โ | โ |
| .NET Framework 4.6.2 | โ | โ |
Documentation
| Document | Description |
|---|---|
| USAGE.md | Detailed installation & usage guide (NuGet tool, EXE, build from source, workflows, tips) |
| CHANGELOG.md | Version history and release notes |
License
This project is licensed under the MIT License.
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-improvement) - Commit your changes (
git commit -m 'Add my improvement') - Push to the branch (
git push origin feature/my-improvement) - Open a Pull Request
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. 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 is compatible. 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. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
.NETFramework 4.6.2
- System.ValueTuple (>= 4.5.0)
-
.NETFramework 4.7.2
- No dependencies.
-
.NETFramework 4.8
- No dependencies.
v3.0.0 โ Multi-target framework support: .NET 10, 9, 8, 7, 6 and .NET Framework 4.8, 4.7.2, 4.6.2. Global tool for .NET 6+, standalone EXE for .NET Framework. All APIs polyfilled for full backward compatibility.