Namespace with an Underscore

Feb 6, 2012 at 11:44 PM

Using NuGet and the package pulled created a namespace with an underscore.  How do I add a rule to allow namespaces such as: App_Start?

 

Coordinator
Feb 7, 2012 at 8:30 PM

Hi,

Just go to StyleCop+ / Advanced Naming Rules / Entities / Namespace and change naming rules.
By default it is $(AaBb), which allows NamesThatUsePascalStyle.

You could add another line $(AaBb)_$(AaBb), which would allow any namespaces with single underscore (e.g. My_Namespace, Desktop_App).

Or, you could add App_$(AaBb), which would allow only namespaces starting with App_ (e.g. App_Start, App_Finish).

Or, you could add App_Start which would allow only single App_Start namespace (but not App_Finish).

Please let me know if you need more help with this.

Best regards,
Oleg Shuruev