omnisharp-roslyn icon indicating copy to clipboard operation
omnisharp-roslyn copied to clipboard

VS Code: Error after creating blazor project: "The name 'routeData' does not exist in the current context."

Open v-sherryfan opened this issue 2 years ago • 0 comments

REPRO CONFIGURATION: Win10 x64 ENU 20H2 + SDK 7.0.100-preview.2.22152.5 Latest SDK Version: 7.0.100-preview.2.22152.5 Latest Runtime Version: 7.0.0-preview.2.22128.3

INSTALL STEPS​:

  1. Clean machine: Win 10 x64 ENU 20h2
  2. Install the sdk 7.0.100-preview.2.22152.5 from: https://aka.ms/dotnet/7.0.1xx-preview2/daily/dotnet-sdk-win-x64.exe
  3. Install VS Code from: https://code.visualstudio.com/Download
  4. Install C# Extensions version: v1.24.1.vsix from: https://github.com/OmniSharp/omnisharp-vscode/releases

Testcases Affected SimpleBlazorRazorEditingWithVSCode

Platform

  • [x] Windows
  • [x] macOS
  • [x] Linux

Repro Steps

  1. Open a normal Terminal Emulator
  2. Create blazor project and open it using VS code
  md Blazor
  cd Blazor
  dotnet new blazorserver
  code .
  1. Go to https://github.com/OmniSharp/omnisharp-vscode/releases > Download the csharp-1.24.1.vsix.
  2. In VS Code and go to the Extensions Tab, select "Install from VSIX" > install the file you downloaded.
  3. Navigation to the problems window will encounter a error: "The name 'routeData' does not exist in the current context."

Note: 1. Error will disappear if you open the App.razor file 2. This issue works fine on C# Extensions is v1.24.0.

Actual Result image

Expected Result The problems window does not have error.

v-sherryfan avatar Mar 03 '22 09:03 v-sherryfan