Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spurious RS2003 error on latest 7.0 SDK #5867

Closed
roji opened this issue Feb 9, 2022 · 3 comments
Closed

Spurious RS2003 error on latest 7.0 SDK #5867

roji opened this issue Feb 9, 2022 · 3 comments

Comments

@roji
Copy link
Member

roji commented Feb 9, 2022

When building EF Core with SDK 7.0.100-preview.2.22108.9, I get:

CSC : error RS2003: Rule 'EF1001' was shipped in analyzer release '3.0.0', but is no longer a supported diagnostic for any analyzer. Add an entry for this rule in a 'Removed Rules' table to unshipped file. [/home/roji/projects/efcore/src/EFCore.Analyzers/EFCore.Analyzers.csproj]

Contents of AnalyzerReleases.Shipped.md:

## Release 2.1.0

### New Rules
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
EF1000  | Usage    | Warning  | RawSqlStringInjectionDiagnosticAnalyzer, [Documentation](https://docs.microsoft.com/ef/core/querying/raw-sql)

## Release 3.0.0

### New Rules
Rule ID | Category | Severity | Notes
--------|----------|----------|-------
EF1001  | Usage    | Warning  | InternalUsageDiagnosticAnalyzer

### Removed Rules
Rule ID | Category | Severity | Notes
--------|----------|----------|--------------------
EF1000  | Security | Disabled | RawSqlStringInjectionDiagnosticAnalyzer, [Documentation](https://docs.microsoft.com/ef/core/querying/raw-sql)

No changes were done since EF Core 3.0, and the EF1001 diagnostic is very much alive.

To repro, clone https://github.com/dotnet/efcore, go into src/EFCore.Analyzers and try to build.

@Youssef1313
Copy link
Member

Youssef1313 commented Feb 10, 2022

@roji Are you using target-typed new? If yes, then this is a known issue. For now you'll have to revert target-typed new changes. There was a compiler change in IOperation that caused this.

@Youssef1313
Copy link
Member

Duplicate of #5828

@roji
Copy link
Member Author

roji commented Feb 10, 2022

Thanks @Youssef1313 - yeah, we're using target-typed new exactly as described in #5828. Closing as dup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants