Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undo "Folder '<folderName>' do not introduce namespace" from Resharper

I created a class within a sub-folder of my project, and the namespace didn't match the folder structure. Resharper underlined the namespace and, while looking at the options Resharper presented to fix the problem, accidentally selected the option for "Folder does not generate a namespace". Where is that setting stored? I want to undo that choice so that Resharper enforces namespace / directory parity, at least for that folder.

I've checked in the .sln and then .csproj file, along with the directory in question for any loose files that might contain the information, and can't find how Resharper is storing that in order to remove it.

enter image description here

like image 857
Bradley Uffner Avatar asked Jul 13 '17 16:07

Bradley Uffner


1 Answers

Thanks to DavidG for the technical answer, but I just stumbled on what could be considered the "correct" way to change the setting, at least it is friendlier than manually editing a raw XAML file.

If you select the folder in the Solution Explorer and check the properties window, there is a property called "Namespace Provider" under a "ReSharper" catagory. Setting it to true will restore the default behavior of ReSharper expecting the namspace to match the directory structure.

Properties Window

like image 167
Bradley Uffner Avatar answered Sep 19 '22 17:09

Bradley Uffner