Reputation: 14279
SO I have a HUGE C#/ASP.NET application that is now getting re-appropriated for other projects. I would like to change our project specific namespaces to something more generic.
Using the right-click refactor on the namespace name only globally changes imports for that specific file. This will be a huge ordeal by hand. Is there a better way to do it than just carefully done find and replace?
Also, we use codebehinds so front-facing aspx pages will also have to change their imported namespaces.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Read.aspx.cs" Inherits="ProjectSpecificNamespace.Read" %>
and of course the cs file imports and any references in inline code pages will also have to change.
Upvotes: 1
Views: 169
Reputation: 6259
If you have ReSharper you can change a folder name, and then "Adjust Namespaces" - if you want to change the default namespace of an entire assembly, you can edit that setting in the project properties, and then adjust namespaces. You can adjust all namespaces in an entire solution with one click this way.
Upvotes: 3