I want to set up some new dependency rules for a repo which has multiple solutions and assemblies. Rule should be, such as:- in any project, all the assemblies of type .ABC. should not depend upon .XYZ.. Any violation of such rule should be caught either during building an assembly or during CI.
1.I tried NsDepCop. There I created a config.NSDepCop file for rules. But the ‘config.nsdepcop file’s build action is not set as C# analyzer additional file due to which Visual studio is unable to detect config.nsdepcop file as C# analyzer file and on building the solution the dependency rules analyzed.
Another ways are "Custom Roslyn rules", "Resharper", FxCop custom rules and NDepend but I have little to no idea about these.
Could anyone please help me out here?