The namespace of a Coded UI Test Map (UIMap.uitest)?
Does anybody know how one can change the namespace of a "Coded UI Test Map" also known as UIMap? Or how the designer does the naming?
When adding a UIMap to your project, you get to cs-files:
e.g.
- UIMap.cs
- UIMap.Designer.cs
The designer file is auto generated (thus not for editing yourself) and the other file is for own customizations.
In my case I want to change the namespace of both files because I added some folders to organise stuff. What I did was manually changing the namespace of both files. But since the designer generates file 2) the namespace was also changed again, screwing up my references. Now I hoped to find a property to enter my own namespace naming. The property I found was for the file "UIMap.uitest",开发者_开发技巧 named "Custom Tool Namespace". This property didn't do the trick. I also had a look in the xml of "UIMap.uitest" to find a namespace reference but again no success. So I guess the naming is hardcoded by the designer...
The designer always generates this namespace:
namespace TestProject.UIMaps.UIMapClasses
- "TestProject" is the default sln namespace
- "UIMaps" is my added folder
- "UIMapClass": don't no the origin but seem to be auto-generated from the name of the "Coded UI Test Map" (here UIMap) + "Classes".
Can anybody confirm the namespace naming convention by the designer? Or knows a way to manually fix it?
If you are talking about the root namespace, it's in the project properties dialog
- right click the project
- select the properties menu item
- on the application tab, look for the Default namespace: text box and put what you want in there. It can consist of several levels e.g.
BigNamespace.CompanyNamespace.ITProject.Solution.Project..... etc. when you perform any action that will require a rewrite of the file, those namespace lines get rewritten. Or you can do it by hand. I looked it up because it was giving me heartburn too.
精彩评论