Skip to content

Update the analyzer version in runtime and enable the TFM attributes on browser build#47789

Merged
buyaa-n merged 2 commits intodotnet:masterfrom
buyaa-n:use_latest_analyzer
Feb 4, 2021
Merged

Update the analyzer version in runtime and enable the TFM attributes on browser build#47789
buyaa-n merged 2 commits intodotnet:masterfrom
buyaa-n:use_latest_analyzer

Conversation

@buyaa-n
Copy link
Contributor

@buyaa-n buyaa-n commented Feb 2, 2021

Related to: #44231 (comment) and #44257

By design, SDK adds SupportedOSPlatofrm("targetPlatform") attribute into AssemblyInfo.cs for multi-targeted projects build in runtime which causing CA1416 warnings mostly on .net5-Browser targeted builds.

We decided to suppress those warnings at the analyzer level, the work is done and merged into roslyn-analyzers repo and now we can dogfood that change. This PR:

  1. Updates the analyzer version to dogfood that change
  2. Update the logic which is removing SupportedOSPlatofrm("Browser") attribute added my MSBuild from AssemblyInfo

@ghost
Copy link

ghost commented Feb 2, 2021

I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label.

@buyaa-n buyaa-n changed the title Remove logic for removing supported attributes for browser targeted builds, use latest analyzer Update the analyzer version in runtime and enable the TFM attributes on browser build Feb 2, 2021
@buyaa-n
Copy link
Contributor Author

buyaa-n commented Feb 4, 2021

Test failures unrelated, merging

@buyaa-n buyaa-n merged commit e0da256 into dotnet:master Feb 4, 2021
@buyaa-n buyaa-n deleted the use_latest_analyzer branch February 4, 2021 05:09
@ghost ghost locked as resolved and limited conversation to collaborators Mar 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants