Previously some of the classes were present in MyProject.Web.Core
project, which are moved to MyProject.Model
project. However these moved classes have namespace as MyProject.Web.Core
.
So, how can I change the namespace for all classes to MyProject.Model
as we don't want to update them manually. Is there any option available in VS2017 ?
We have already update the default namespace in project properties, so that will be get applied when new class is added. But, how about for the moved/old classes?
Set your cursor into the namespace and then hit F2 to rename (if F2 didn't work, try CTRLR + CTRLR or rightclick - rename). All related namespaces should be changed.
This is a case where Jetbrains Resharper can help you. It identifies namespace mismatches and allows fixing it solution-wide.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With