9

I see people talking about the annoyance of Visual Studio automatically creating a namespace to correspond with project folders. Is there a way to turn this off in VS 2010, without resorting to modifying class templates?

Community
  • 1
  • 1
Brent Arias
  • 29,277
  • 40
  • 133
  • 234

2 Answers2

11

If you use Resharper, there is an attribute on the folder 'Namespace Provider'.

enter image description here

Even if you set it to false, Visual Studio will still add folder name as a namespace. However, Resharper fixes it with one click on the namespace.

Alex Aza
  • 76,499
  • 26
  • 155
  • 134
  • 2
    This answer doesn't address how to turn the convention off, it only tells how to make a specific folder not a provider. – ProfK May 18 '14 at 07:53
2

Use Resharper. Turn off the "Namespace Provider" option and you should be good to go without modifying class templates.

IAmTimCorey
  • 16,412
  • 5
  • 39
  • 75