dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.04k stars 4.03k forks source link

Razor compilation fails on dotnet 6 project with 7.0.100-rc.1.22431.12 #64499

Closed ErikApption closed 2 years ago

ErikApption commented 2 years ago

Version Used: 7.0.100-rc.1.22431.12

Steps to Reproduce:

  1. Pull https://github.com/NRCan/datahub-portal/tree/ep/dotnet7_bug
  2. run dotnet build

Expected Behavior:

Project compiles correctly

Actual Behavior: Compiler throws syntax errors

15>C:\code\datahub-portal\WebPortal\Microsoft.NET.Sdk.Razor.SourceGenerators\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Pages_Profile_Sections_ProfileAchievements_razor.g.cs(464,161,464,162): error CS1001: Identifier expected
15>C:\code\datahub-portal\WebPortal\Microsoft.NET.Sdk.Razor.SourceGenerators\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Pages_Profile_Sections_ProfileAchievements_razor.g.cs(464,190,464,191): error CS1525: Invalid expression term '>'
15>C:\code\datahub-portal\WebPortal\Microsoft.NET.Sdk.Razor.SourceGenerators\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Pages_Profile_Sections_ProfileAchievements_razor.g.cs(472,30,472,31): error CS1003: Syntax error, ':' expected
15>C:\code\datahub-portal\WebPortal\Microsoft.NET.Sdk.Razor.SourceGenerators\Microsoft.NET.Sdk.Razor.SourceGenerators.RazorSourceGenerator\Pages_Profile_Sections_ProfileAchievements_razor.g.cs(472,30,472,31): error CS1525: Invalid expression term ')'
jaredpar commented 2 years ago

@333fred suspect this is a variant of the tuple bug. Please take a look.

333fred commented 2 years ago

This is the tuple bug. I've confirmed that it is fixed on RC2, which was released today.