dotnet / dotnet/project-system

Missing rule ID entries in Ruleset Editor when opening ruleset added to new SDK style project

Open
#3,573 6 comments 5 reactions 0 assignees View on GitHub
Parity-Legacy-API Parity-Legacy-Feature Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

I am using the latest internal VS dogfood build, but this repros on 15.7 as well.

***Repro Steps (Repro 1):***
1. Create a new .NET framework class library project (old project system)
2. Create an empty ruleset file named `MyRules.ruleset` at the root of project with following contents:
```

```
3. Add the following property to the project file to add ruleset to the project: `MyRules.ruleset`
4. Add a NuGet package reference to latest stable [FxCopAnalyzers package](https://www.nuget.org/packages/Microsoft.CodeAnalysis.FxCopAnalyzers)
5. Open `MyRules.ruleset` in the ruleset editor by executing `Solution Explorer -> Project Node -> References -> Analyzers -> Open Active Ruleset`
6. Search `CA1034` in the search box in the ruleset editor and confirm you get 2 entries, one for `Managed Binary Analysis` and one for `Microsoft.CodeQuality.Analyzers`:
![image](https://user-images.githubusercontent.com/10605811/40498630-6468692e-5f34-11e8-99c8-d054e5e750b7.png)

7. Repeat the above steps for a new SDK style project .NET standard class library project.

***Expected***
Searching `CA1034` shows same 2 entries for SDK style project, that were seen in step 6 for old style project.

***Actual***
No matching entries
![image](https://user-images.githubusercontent.com/10605811/40499051-a09c450e-5f35-11e8-9e8d-c73375359a8e.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.