realvizu/NsDepCop

VS 2022- Dont see NsDepCop work in C# ClassLibrary (.Net Framework) project

edwin-alvarez opened this issue · 2 comments

is NsDepCop supported on
Target Framework = .Net Framework 4.8
Output Type = Class Library
Platform = any CPU (x64)

child project
config.NsDepCop

<NsDepCopConfig IsEnabled="true" ChildCanDependOnParentImplicitly="true" InheritanceDepth="1">
</NsDepCopConfig> 

root
config.NsDepCop

<NsDepCopConfig IsEnabled="true" ChildCanDependOnParentImplicitly="true" InheritanceDepth="">
	<Allowed From="*" To="System.*" />
	<Disallowed From="xxx" To="yyy"/>
</NsDepCopConfig>

Yes, it's supported.
Try to remove the InheritanceDepth attribute from the root level file. Maybe the parser fails on the empty attribute value.

Tested in new project and works great