I'm modifying demo application from this article: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
I need to update all files to use my namespace, for example now file located here:
MySolution\MyApp\DemoApp\ViewModel\MainWindowViewModel.cs
is using such namespace:
namespace DemoApp.ViewModel
{
/// <summary>
/// The ViewModel for the application's main window.
/// </summary>
public class MainWindowViewModel : WorkspaceViewModel
I need to move file here (remove DemoApp folder):
MySolution\MyApp\ViewModel\MainWindowViewModel.cs
and also to use right namespace:
namespace MyApp.ViewModel
{
....
how to do that in visual studio 2010?
Update ok here is possible duplicate Change Project Namespace in Visual Studio Now I know how to change the namespace of the project, but how to move files on the file system? (get rid of "DemoApp" folder)
I imagine a simple Replace in Files (Ctrl+Shift+H) will just about do the trick; simply replace
namespace DemoApp
withnamespace MyApp
. After that, build the solution and look for compile errors for unknown identifiers. Anything that fully qualifiedDemoApp
will need to be changed toMyApp
.Just right click the solution, go to properties, change "default namespace" under 'Application' section.