Home > c#, Visual Studio 2005 > ReSharper 3.0 and Namespaces?

ReSharper 3.0 and Namespaces?

May 7, 2007

I’ve been using b423 of ReSharper 3.0 for a while now (the EAP program is great! thank you JetBrains!) and, today, noticed that in Orcas, my namespaces have issues.

Odd; it seems to be something to ignore for now; but I’m curious what framework standard or such it’s verifying my file structure against.  Yes, it’s true, the code files are all in the same structure (all 5 of them)… I can ignore it, but I’d prefer to understand what it’s drawing from and why.

Categories: c#, Visual Studio 2005
  1. May 7, 2007 at 11:14 pm

    It matches namespace to code file location, i.e. project/folder structure. If you have default project namespace as “USD259” and file in question is not in the “Authentication” subfolder, it will issue a warning. You can switch it off in the options, or make your projhect/folder/file structure match namespaces.

  2. May 8, 2007 at 5:25 am

    Ahh, okay, that makes sense, but does that relate to a specific CLS specification or just a note of good housekeeping on JetBrains’ part?

  3. May 8, 2007 at 9:06 am

    It has nothing to do with specification, but it is widely adopted practice. Also, VS creates new code files with namespace generated using the same rule. This just keeps things cleaner.

    Note, that with ReSharper you can exclude some folders from namespace path by opening folder properties and changing “Namespace Provider” setting. Useful, when you have something like “source” folder, or some leaf folders which just sort things up and shoudn’t participate in namespace structure.

  1. No trackbacks yet.
Comments are closed.
%d bloggers like this: