DebtSettings handling when SettingsFilePath is set
When storing debt settings in an external .ndsettings file, the settings are still pulled in to the ndproj file when the first scan is run. There should be an option to prevent these settings from being copied into the ndproj file. When managing ndproj files using source control, this would lead to fewer changes since the when the external ndsettings file is changed, it would not impact the ndproj files referencing it.
Complete with version 2022.2.1
-
Travis Schettler commented
This is still happening as of version 2022.2. We are using globally shared debt settings that are read-only. It appears that NDepend is attempting to open the file for write access and since it cannot write to the file, it is adding the settings to the ndproj file.
Here's the error that appears on the Issues and Debt screen:
Error saving Debt Settings
Can't save debt settings in the settings file.
Can't save XML in file {Shared File Path}
Exception.Type {System.UnauthorizedAccessException}
Exception.Message {Access to the path 'Shared File Path' is denied.}Debt settings have been saved in the project file.