Visual-studio – Why doesn’t the “Namespace Provider” property get saved within a project file for a given subdirectory

code analysisnamespacesresharpervisual studiovisual-studio-2008

Sub directories within VS2008 projects are mainly used to physically represent on disk the namespace structure for the project. Each folder has a Boolean property called “Namespace Provider”, which when set to True causes ReSharper to validate that the physical location of a given class corresponds to the logical namespace location.

Occasionally I don’t want a folder to be used as a Namespace Provider, so I set this property to False, and ReSharper doesn’t perform the check.

Problem

This setting doesn’t get saved in the project file, and therefore reverts to the default value of True next time I open the solution. It’s not that big a deal but ReSharper does give you lots of warnings about incorrect namespaces.

Why doesn’t the property value get saved?

Versions…

ReSharper 4.0 with VS2008 SP1

Best Answer

For me this setting is saved in a .csproj.resharper file. We have had problems because some developers add an ignore pattern on this file, and don't check it in.

Related Topic