Is it possible to have a single config.nsdepcop at sln level #77
-
Hi, first of all thanks for your effort - I was just evaluating NsDepCop and it looks great. Only thing I was wondering - to get it running I needed to put a config.nsdeopcop file (even if it is empty) on every project level directory. Is it possible to have it just in the root folder on sln level? Assume you have following dir-tree - I currently needed to have it like
I would like to have it like (so I couldn't forget to put a config when adding projects)
Not sure if I did something wrong :) but it would be great if all rules could go to the config.nsdeopcop at root level. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Yes, that's correct. Currently, each project folder where you want to run the tool must include a config.nsdepcop file. This requirement exists because the tool functions as a Roslyn analyzer, which operates within the project scope and processes the config file as an additional file. That said, it could be possible to extend NsDepCop to look for a solution-level config file if a project-level one is not present. I'll create an issue for this enhancement, and we'll see if someone is interested in implementing it. |
Beta Was this translation helpful? Give feedback.
-
@realvizu thanks for your feedback 😄 I guess I've found viable way to beahve it like I wanted without any changes.
in it. That way I don't have to add it to each project (and maybe miss that) Cheers, |
Beta Was this translation helpful? Give feedback.
Yes, that's correct. Currently, each project folder where you want to run the tool must include a config.nsdepcop file.
This requirement exists because the tool functions as a Roslyn analyzer, which operates within the project scope and processes the config file as an additional file.
That said, it could be possible to extend NsDepCop to look for a solution-level config file if a project-level one is not present. I'll create an issue for this enhancement, and we'll see if someone is interested in implementing it.