4
I need to restructure the folders of a project, only that there are many files and their respective namespaces need to be changed.
Is there any way to change the namespace automatically when moving a file. Cs from one folder to another?
4
I need to restructure the folders of a project, only that there are many files and their respective namespaces need to be changed.
Is there any way to change the namespace automatically when moving a file. Cs from one folder to another?
2
A way to do this in Visual Studio without external aid is to make a simple locate and replace, press the keys CTRL + Shift + H, will open the window shown below, now just replace the namespace.
effectively, the lack of external assistance is the best that can be done. Although it is better to change the Look in
for a more restricted scope (for example open all files in the folder and do the Find and Replace
in the open files.
Browser other questions tagged c# namespace
You are not signed in. Login or sign up in order to post.
If you use R# you can change the folder files and at the end use the option to adjust the namespaces (select the files, right-click on the files, Refactor -> Adjust namespaces (shortcut: Ctrl+R, Ctrl+R)).
– Omni
You can install Resharper?
– Leonel Sanches da Silva
Omni and Gypsy, I use the VS2013 Express. I tried to install it but could not because of the version.
– Filipe Oliveira
@Filipeoliveira could try to install the Coderush (I’m not sure it works on Express).
– Omni
@Omni, Coderush also does not work on no Express.
– Filipe Oliveira
@Filipeoliveira the response of Sunstreaker is able to help you. Just pay attention to the comment I made in this reply (prevents headaches and speeds up the process)
– Omni