I created a project in Visual Studio 2010 but I mispelled the name well into development.
If I right click, and rename the project开发者_StackOverflow社区, it seems the changes aren't cascaded to folders and classes.
For example, if my project was named Foa and I added a class, the namespace would be:
namespace Foa
{
public class Bar
If I renamed the project to Foo, the class stays:
namespace Foa
{
public class bar
Is there a way to cascade that change?
Change the namespace in one spot and then Ctrl+. on it and choose the refactor option. This will change the namespace throughout.
Change the default namespace in the project properties, then use a refactor tool to change the namespaces. Resharper has a fix inconsistent namespaces tool that will do it but you can just use the visual studio refactor to do it manually.
精彩评论