-
Notifications
You must be signed in to change notification settings - Fork 199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Blazor Components not found when working in multi-root workspace #5517
Comments
So I'm not sure if it's related, but in the example scenario above, it take a while to load, but it eventually loads. The Razor log seems off to me. It 'Update' the project file many times before finallizing the load. Razor Log (simple project - working)--------------------------------------------------------------------------------
Razor.VSCode version 1.0.0-alpha3-5.0.0-alpha.1.20073.7
--------------------------------------------------------------------------------
Razor's trace level is currently set to 'Verbose'
- To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' and then restart VSCode.
- To report issues invoke the 'Report a Razor issue' command via the command palette.
-----------------------------------------------------------------------------------------------------------------------------
[Client - 1:41:19 AM] Razor language server path: /root/.vscode-server/extensions/ms-vscode.csharp-1.21.11/.razor/rzls Razor Log (from https://github.com/thomasrea0113/pr-leaderboard/tree/with-blazor)I created a quick branch to demonstrate the issue. The blazor app is just the result of --------------------------------------------------------------------------------
Razor.VSCode version 1.0.0-alpha3-5.0.0-alpha.1.20073.7
--------------------------------------------------------------------------------
Razor's trace level is currently set to 'Verbose'
- To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' and then restart VSCode.
- To report issues invoke the 'Report a Razor issue' command via the command palette.
-----------------------------------------------------------------------------------------------------------------------------
[Client - 9:01:30 PM] Razor language server path: C:\Users\reat.vscode\extensions\ms-vscode.csharp-1.21.11.razor\rzls.exe |
I think I'm hitting the same issue (I was about to make a new issue, but given the title, it seems fitting I drop in here): Reproduction Steps
Razor logs from step 3
Razor logs from step 4
Fortunately, I can work around this for now as the actual workspace I'm using only has one Blazor project. Further technical detailsVSCode version: 1.42.1 C# Extension: 1.21.11 Dotnet Information.NET Core SDK (reflecting any global.json): Version: 3.1.101 Commit: b377529961Runtime Environment: Host (useful for support): .NET Core SDKs installed: .NET Core runtimes installed: To install additional .NET Core runtimes or SDKs: Visual Studio Code Extensions
|
I think the issue is more general than just Blazor. I'm seeing import and type errors across all my razor pages. After a while, the razor language server crashes entirely and I have to restart. I'll post another comment when I have a chance to gather more information. |
Thanks for contacting us. We're closing this issue as there was no community involvement here for quite a while now. You can learn more about our triage process and how we handle issues by reading our Triage Process writeup. |
Issue Description
When a Blazor application is added to a multi-root workspace, the
.razor
pages no longer find existing components.Steps to Reproduce
dotnet new blazorserver
Expected Behavior
Actual Behavior
This really seems to be all over the place. I've had some luck getting it work with a simple xunit project in the same workspace, but it's not consistent. When I try and actually port it into my existing application, it doesn't work at all. I just see this error:
Found markup element with unexpected name 'AuthorizeRouteView'. If this is intended to be a component, add a @using directive for its namespace.(RZ10012)
Logs
OmniSharp log
OmniSharp server started.
Path: C:\Users\reat.vscode\extensions\ms-vscode.csharp-1.21.11.omnisharp\1.34.11\OmniSharp.exe
PID: 12140
Starting OmniSharp on Windows 6.2.9200.0 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 3 MSBuild instance(s)
1: Visual Studio Enterprise 2019 16.4.29709.97 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
2: Visual Studio Build Tools 2017 15.9.28307.960 - "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
3: StandAlone 16.3 - "C:\Users\reat.vscode\extensions\ms-vscode.csharp-1.21.11.omnisharp\1.34.11.msbuild\Current\Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: Visual Studio Enterprise 2019 16.4.29709.97 - "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in 'c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
No solution files found in 'c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for 'c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest\BlazorTest.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in 'c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectManager
Loading project: c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest\BlazorTest.csproj
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location 'c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest' on host 3568.
info: OmniSharp.OmniSharpWorkspace
Miscellaneous file: c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest\App.razor__virtual.cs added to workspace
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file 'c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest\BlazorTest.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project 'c:\Users\reat\Documents\Personal\repos\pr-leaderboard\BlazorTest\BlazorTest.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: BlazorTest
C# log
Environment information
VSCode version: 1.42.0
C# Extension: 1.21.11
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.101 Commit: b377529961Runtime Environment:
OS Name: ubuntu
OS Version: 18.04
OS Platform: Linux
RID: ubuntu.18.04-x64
Base Path: /usr/share/dotnet/sdk/3.1.101/
Host (useful for support):
Version: 3.1.1
Commit: a1388f194c
.NET Core SDKs installed:
3.1.101 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
The text was updated successfully, but these errors were encountered: