user3812871 user3812871 - 3 months ago 23
C# Question

C# namespace for extending another product

I am currently creating a Visual Studio extension my issue is figuring out the namespace. I know the convention is (< Company >.< Product >).< Feature > , my problem is that I have created a utility library that targets Visual Studio explicitly. How do I name this namespace?

using MyCoolCompany.VisualStudio.Utility;


or

using MyCoolCompany.VisualStudioUtility;

Answer

If you want to follow the convention, it would be

MyCoolCompany.VisualStudioUtility

since your company created a utility for Visual Studio, not Visual Studio itself (thus the utility is the product).

But it's just a convention; not everyone follows it at all times - not even Microsoft! (So many namespaces in the .NET framework start with System and not Microsoft)

Comments