Skip to content

Conversation

@ajaybhargavb
Copy link
Contributor

@ajaybhargavb ajaybhargavb commented Jul 2, 2020

Description

Bug: AspNetCore templates fail to build in the latest VS.
Context: This was because Roslyn updated their MaxSupportedLangVersion in VS to 9.0 but Razor's Roslyn dependencies are out of date and don't support 9.0
Fix: Update Razor's Roslyn dependencies to a version that supports C# LangVersion 9.0.

Customer Impact

  • Was the bug reported by a customer? No
  • How does the bug impact the customer? Customers will see build errors when building with VS.
  • Are there any workarounds? If so, why are they not acceptable alternatives? None

Regression?

No

Risk

Low (Package upgrades only)

@ghost ghost added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jul 2, 2020
@mkArtakMSFT mkArtakMSFT added tell-mode Indicates a PR which is being merged during tell-mode ask-mode This issue / PR is a patch candidate which we will bar-check internally before patching it. Servicing-consider Shiproom approval is required for the issue and removed tell-mode Indicates a PR which is being merged during tell-mode labels Jul 2, 2020
@ghost
Copy link

ghost commented Jul 2, 2020

Hello human! Please make sure you've included the Shiproom Template in a comment or (preferably) the PR description. Also, make sure this PR is not marked as a draft and is ready-to-merge.

@mkArtakMSFT
Copy link
Contributor

mkArtakMSFT commented Jul 2, 2020

Thanks @ajaybhargavb.
Please also fill-in the ask-mode template for this issue.

@ajaybhargavb ajaybhargavb marked this pull request as ready for review July 3, 2020 00:18
{
public partial class StartupAnalyzer : DiagnosticAnalyzer
{
[System.Diagnostics.CodeAnalysis.SuppressMessage("MicrosoftCodeAnalysisReleaseTracking", "RS2008:Enable analyzer release tracking")]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI @Pilchie. This seems onerous to do during ask mode hence suppressed. That said, it's not very clear what the benefit of doing the release tracking is. Would you be able to find out? https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/ReleaseTrackingAnalyzers.Help.md

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mavasani - can you describe the customer benefit of enabling this analyzer? The page linked above talks a lot about the what and the how, but very little about why we would want to do this as analyzer authors.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, I'll add this info to the doc. Analyzer release tracking is analogous to public API tracking, but for analyzer packages. It allows the analyzer authors to track which analyzers were part of each analyzer release, with their default severity + enabled by default state. For example, see https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/Core/AnalyzerReleases.Shipped.md and https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.Analyzers/Core/AnalyzerReleases.Unshipped.md. It basically tracks the how an analyzer package has evolved over time.

Additionally, this should eventually allow analyzers that ship as part of an SDK to enable warning waves support, wherein the end user can choose a specific analyzer release version in the project file, and the tooling will automatically disable all rules shipped for the first time after that release. We are using this mechanism to enable warning waves support for .NET analyzers that will ship with .NET5 SDK, though right now the tooling is very specific to this SDK.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mkArtakMSFT mkArtakMSFT added tell-mode Indicates a PR which is being merged during tell-mode and removed ask-mode This issue / PR is a patch candidate which we will bar-check internally before patching it. labels Jul 4, 2020
@mkArtakMSFT mkArtakMSFT added this to the 5.0.0-preview7 milestone Jul 4, 2020
@mkArtakMSFT
Copy link
Contributor

Given that this is only a package version update, this should go through tell-mode, rather than ask-mode.
I'm about to send the email to tactics now, so feel free to merge when the checks pass.

@mkArtakMSFT mkArtakMSFT merged commit 7412976 into release/5.0-preview7 Jul 6, 2020
@mkArtakMSFT mkArtakMSFT deleted the update-roslyn branch July 6, 2020 21:35
dougbu added a commit to dotnet/razor that referenced this pull request Jul 7, 2020
- from 3.7.0-2.20257.6 to 3.7.0-4.20351.7
- matches dotnet/aspnetcore#23630 / dotnet/aspnetcore@7412976b4c8d
- left `$(Tooling_MicrosoftCodeAnalysisAnalyzersPackageVersion)` alone
    - at latest shipped version (3.0.0)
dotnet-maestro bot added a commit to dotnet/razor that referenced this pull request Jul 7, 2020
* Update dependencies from https://github.com/dotnet/aspnetcore build 20200706.10

Microsoft.NET.Sdk.Razor , Microsoft.CodeAnalysis.Razor , Microsoft.AspNetCore.Razor.Language , Microsoft.AspNetCore.Razor.Internal.Transport , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X , Microsoft.AspNetCore.Mvc.Razor.Extensions
 From Version 5.0.0-preview.8.20356.8 -> To Version 5.0.0-preview.8.20356.10

* Update dependencies from https://github.com/dotnet/aspnetcore build 20200706.11

Microsoft.NET.Sdk.Razor , Microsoft.CodeAnalysis.Razor , Microsoft.AspNetCore.Razor.Language , Microsoft.AspNetCore.Razor.Internal.Transport , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X , Microsoft.AspNetCore.Mvc.Razor.Extensions
 From Version 5.0.0-preview.8.20356.8 -> To Version 5.0.0-preview.8.20356.11

* Update dependencies from https://github.com/dotnet/aspnetcore build 20200706.12

Microsoft.NET.Sdk.Razor , Microsoft.CodeAnalysis.Razor , Microsoft.AspNetCore.Razor.Language , Microsoft.AspNetCore.Razor.Internal.Transport , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X , Microsoft.AspNetCore.Mvc.Razor.Extensions
 From Version 5.0.0-preview.8.20356.8 -> To Version 5.0.0-preview.8.20356.12

Dependency coherency updates

Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.Logging,System.Diagnostics.DiagnosticSource,System.Resources.Extensions,System.Text.Encodings.Web,Microsoft.Extensions.DependencyModel,Microsoft.NETCore.App.Ref,Microsoft.NETCore.App.Internal,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset
 From Version 5.0.0-preview.8.20352.6 -> To Version 5.0.0-preview.8.20354.5 (parent: Microsoft.CodeAnalysis.Razor

* Update dependencies from https://github.com/dotnet/aspnetcore build 20200707.1

Microsoft.NET.Sdk.Razor , Microsoft.CodeAnalysis.Razor , Microsoft.AspNetCore.Razor.Language , Microsoft.AspNetCore.Razor.Internal.Transport , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X , Microsoft.AspNetCore.Mvc.Razor.Extensions
 From Version 5.0.0-preview.8.20356.8 -> To Version 5.0.0-preview.8.20357.1

Dependency coherency updates

Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.Logging,System.Diagnostics.DiagnosticSource,System.Resources.Extensions,System.Text.Encodings.Web,Microsoft.Extensions.DependencyModel,Microsoft.NETCore.App.Ref,Microsoft.NETCore.App.Internal,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset
 From Version 5.0.0-preview.8.20352.6 -> To Version 5.0.0-preview.8.20354.5 (parent: Microsoft.CodeAnalysis.Razor

* Update dependencies from https://github.com/dotnet/aspnetcore build 20200707.2

Microsoft.NET.Sdk.Razor , Microsoft.CodeAnalysis.Razor , Microsoft.AspNetCore.Razor.Language , Microsoft.AspNetCore.Razor.Internal.Transport , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X , Microsoft.AspNetCore.Mvc.Razor.Extensions
 From Version 5.0.0-preview.8.20356.8 -> To Version 5.0.0-preview.8.20357.2

Dependency coherency updates

Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.Logging,System.Diagnostics.DiagnosticSource,System.Resources.Extensions,System.Text.Encodings.Web,Microsoft.Extensions.DependencyModel,Microsoft.NETCore.App.Ref,Microsoft.NETCore.App.Internal,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset
 From Version 5.0.0-preview.8.20352.6 -> To Version 5.0.0-preview.8.20354.5 (parent: Microsoft.CodeAnalysis.Razor

* Update dependencies from https://github.com/dotnet/aspnetcore build 20200707.6

Microsoft.NET.Sdk.Razor , Microsoft.CodeAnalysis.Razor , Microsoft.AspNetCore.Razor.Language , Microsoft.AspNetCore.Razor.Internal.Transport , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version2_X , Microsoft.AspNetCore.Mvc.Razor.Extensions.Version1_X , Microsoft.AspNetCore.Mvc.Razor.Extensions
 From Version 5.0.0-preview.8.20356.8 -> To Version 5.0.0-preview.8.20357.6

Dependency coherency updates

Microsoft.Extensions.Configuration.Json,Microsoft.Extensions.Logging,System.Diagnostics.DiagnosticSource,System.Resources.Extensions,System.Text.Encodings.Web,Microsoft.Extensions.DependencyModel,Microsoft.NETCore.App.Ref,Microsoft.NETCore.App.Internal,Microsoft.NETCore.App.Runtime.win-x64,Microsoft.NETCore.Platforms,Microsoft.Net.Compilers.Toolset
 From Version 5.0.0-preview.8.20352.6 -> To Version 5.0.0-preview.8.20354.5 (parent: Microsoft.CodeAnalysis.Razor

* Bump most `$(Tooling_MicrosoftCodeAnalysis*PackageVersion)` values
- from 3.7.0-2.20257.6 to 3.7.0-4.20351.7
- matches dotnet/aspnetcore#23630 / dotnet/aspnetcore@7412976b4c8d
- left `$(Tooling_MicrosoftCodeAnalysisAnalyzersPackageVersion)` alone
    - at latest shipped version (3.0.0)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Doug Bunting <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework Servicing-consider Shiproom approval is required for the issue tell-mode Indicates a PR which is being merged during tell-mode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants