Closed MarkusRodler closed 1 month ago
@timheuer could be similar to #799 but with Blazor instead of .NET Web API
Good detail, thanks @MarkusRodler -- Might be the underlying language service here and not Dev Kit. /cc @phil-allen-msft @arkalyanms to see if it should move there.
@MarkusRodler can you see below and tell me if in your environment as well performing either of the actions returns you to normal:
https://github.com/microsoft/vscode-dotnettools/assets/4821/849e4622-07de-4a2e-bd8a-cb9f7028b313
@timheuer I tried it again and it works for .NET 7 but not for .NET 8
BlazorTest.Client.csproj:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.0" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Shared\BlazorTest.Shared.csproj" />
</ItemGroup>
</Project>
BlazorTest.Server.csproj
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Client\BlazorTest.Client.csproj" />
<ProjectReference Include="..\Shared\BlazorTest.Shared.csproj" />
</ItemGroup>
</Project>
BlazorTest.Shared.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>
</Project>
Thanks for the pic, I'm using net8 as well -- could be a WSL specific issue at this point.
Agreed, a razor first scout might be appropriate here. cc: @phil-allen-msft
This issue has been marked as stale after 14 days of inactivity. @[ @ryzngard @], could you please take a look?
Still an issue afaik. WSL does seem to be a key problem here. We've also shipped some stability for our runtime targeting for dotnet 8 so that may have changed. Will have to verify if this still repros. @MarkusRodler thanks for the very detailed feedback :)
When talking about using WSL, I want to make sure I get my steps correct since I'm less familiar with the interactions there vs full linux (which I usually test in). I'm assuming this is the WSL extension which would be similar to a locally hosted code space environment?
Still an issue afaik. WSL does seem to be a key problem here. We've also shipped some stability for our runtime targeting for dotnet 8 so that may have changed. Will have to verify if this still repros. @MarkusRodler thanks for the very detailed feedback :)
When talking about using WSL, I want to make sure I get my steps correct since I'm less familiar with the interactions there vs full linux (which I usually test in). I'm assuming this is the WSL extension which would be similar to a locally hosted code space environment?
Yes it is still an issue. The procedure is as seen in the documentation.
Confirmed repro. It looks like we're adding the document then moving it to the misc project instead of keeping it in the current project.
LSP][LanguageServer.ProjectSystem.RazorProjectService] Document '/home/andrha/BlazorTest/Pages/Counter5.razor' no longer exists in project 'ProjectKey { Id = /home/andrha/BlazorTest/obj/Debug/net8.0/ }'. Moving to miscellaneous project.
[Info - 2:44:41 PM] [LSP][LanguageServer.ProjectSystem.RazorProjectService] Moving '/home/andrha/BlazorTest/Pages/Counter5.razor' from the 'ProjectKey { Id = /home/andrha/BlazorTest/obj/Debug/net8.0/ }' project to 'ProjectKey { Id = /tmp/5b011264d0f340099da645416de56d3f/__MISC_RAZOR_PROJECT__/ }' project.
I don't believe this is related to the sdk, but can onfirm that it is related to wsl connection. Potentially a timing issue with notifications of documents being added/removed. Will need to dig further
This has been fixed in v2.39.29
. Note that you may hit an issue with semantic coloring that requires you to type/scroll in the file related to https://github.com/microsoft/vscode/issues/221423
Describe the Issue
If you rename components everything is broken like in #799
Steps To Reproduce
<button class="btn btn-primary" @onclick="IncrementCount">Click me
@code { private int currentCount = 0; private void IncrementCount() => currentCount++; }