how to change namespace of entire project?

前端 未结 11 738
梦如初夏
梦如初夏 2020-12-22 22:30

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

11条回答
  •  北荒
    北荒 (楼主)
    2020-12-22 22:53

    I tried everything but I found a solution which really works. It creates independed solution with a new namespace name an so on.

    1. In main form find namespace name -> right click -> Refactor -> Rename and select a new name. Check all boxes and click OK.

    2. In the solution explorer rename solution name to a new name.

    3. In the solution explorer rename project name to a new name.

    4. Close VS and rename folder (in total commander for example) in the solution folder to a new name.

    5. In .sln file rename old name to a new name.

    6. Delete old .suo files (hidden)

    7. Start VS and load project

    8. Project -> properties -> change Assembly name and default namespace to a new name.

提交回复
热议问题