azure-webjobs-sdk
azure-webjobs-sdk copied to clipboard
Microsoft.Azure.WebJobs suppresses analyzers related to logging
Adding a reference to Microsoft.Azure.WebJobs suppresses analyzers related to logging, e.g. CA1727
, CA2253
, CA2254
Repro steps
Provide the steps required to reproduce the problem
- Create a project with a reference to
Microsoft.Extensions.Logging 6.0.0
- Add a call to a logger with an interpolated string
- Add
<WarningsAsErrors>CA2254</WarningsAsErrors>
to the project file - Try to build, get error
- Add reference to
Microsoft.Azure.WebJobs
- Try to build, error is ignored
Repro repo: https://github.com/markrendle/LoggingAnalyzerRepro
Expected behavior
Using a NuGet package shouldn't disable code analyzers.
Actual behavior
Using Microsoft.Azure.WebJobs
disables some code analyzers.
Known workarounds
None
Related information
Provide any related information
- 3.0.37 (latest)