views:

160

answers:

1

If I place a class file into a folder, the folder's name is appended to the namespace, even if I set "Namespace Provider" property of the folder to False. If I then rename the namespace back, ReSharper underlines it suggesting to change it according to the class file location. How do I suppress this behaviour? I use ReSharper 5 and Visual Studio 2010.

A: 

I'm not getting that behavior (also VS 2010, R# 5). With the Inspection Severity of "Namespace does not correspond to file location" in Options set to Show as warning, the Namespace Provider folder property toggles the warning on and off for me.

It's always appended the folder to the namespace (I think it's Visual Studio doing that). Anybody know a way to turn that off?

TrueWill
You need to add classes not by VS master, but by R# file templates. They are aware of "Namespace Provider" settings.
derigel
@derigel - just tried that at work in VS2008, R#5. Set Namespace Provider to False, Add, New from template, Class. It added the folder name to the namespace. :(
TrueWill