One of my pet hates about Visual Studio is that it assumes that you organise folders in projects according to namespaces and adds folder names to the namespace declaration for classes. Worse still there is no way to turn this behaviour off. Usually I get round this by adding my classes to the root of the project then dragging them to the relevant folder, and I mandate that developers working for me do the same. This week I came across a developer who complained about this and come up with reasons based around the lack of tool help if they forget, so I decided to write an addin that automagically sets the namespace declaration of new C# classes to match the Default Namespace setting in Project Properties. I have called it Clean Namespace. |