dotnet / dotnet/project-system
CodeAnalysisRuleSet property is being cleared when deleting an unused ruleset file from a project
- Dominant language
- C#
- Stars
- 1k
- Forks
- 415
- PR merge metrics
- No merged PRs in 30d
Description
**Visual Studio Version**: 2015, 2019
**Summary**:
When you delete a ruleset file from a project, the CodeAnalysisRuleSet property is being cleared even when it was not referencing the deleted ruleset.
Happens in both old-style and new-style projects.
**Steps to Reproduce**:
1. Create a project with rulesets A and B.
2. Set CodeAnalysisRuleSet to ruleset A.
3. Delete ruleset B.
**Expected Behavior**: CodeAnalysisRuleSet still points to ruleset A.
**Actual Behavior**: CodeAnalysisRuleSet is cleared.
**User Impact**: User's rulesets are being reset without the user knowing about it.
[CodeAnalysisRuleSetBeingCleared.zip](https://github.com/dotnet/project-system/files/4734788/CodeAnalysisRuleSetBeingCleared.zip)
Contributor guide
Assessment
This issue has not been assessed yet.