Once you have created a project / solution, how easy is it to rename it? as I notice the name you chose initially is used everywhere e.g. variable for AppName, in the Privacy and Cookies Policies for the name of the app, for company name in copyright for the page footers, for DB name and throughtout the code in the naming of key files.
I tried a rename in Visual Studio which is how I would normally do it but this just takes an absolute age to complete, even crashing on a couple of attempts. And then if it does complete you have multiple errors to fix manually.
So the question is do you have a proper way one should rename a project if later the original name chosen no longer works for the project?
Thanks
7 Answer(s)
-
0
hi
There is no shortcut, you can search and rename globally.
Thanks.
-
0
Should never be that difficult to rename a project!! or at least the AppName variable should work for ALL display purposes including privacy, cookie, footers etc, so you can just change it in one place
-
0
hi
The project name may be in cs, js, csthml, csproj, etc. files. , we can't use a variable for unified management.
We have to search and rename globally.
Sorry for that.
-
0
Perhaps a powershell script to run that can rename in all required areas?
-
0
hi
You can open your whole project in VS code. then search and replace globally.
-
0
Thanks, had already tried that in VS, Notepad++ and VS Code, but still doesn't work that well, as:
- Doesn't rename files / folders so you still have to manually rename project folder, and the.csproj file name as a minumum before you can open, build and run the project. And still lots of other files still have name of old project
- Breaks the menu titles as shown below - Home becomes Menu:Home for some reason.
-
0
hi
Doesn't rename files / folders so you still have to manually rename project folder, and the.csproj file name as a minumum before you can open, build and run the project. And still lots of other files still have name of old project
This is inevitable. We will consider providing a tool to rename files and folders in the future.
Breaks the menu titles as shown below - Home becomes Menu:Home for some reason.
Please check the localized code, it might be a problem with the
JONS
file path.