You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Counter.razor try to add a method overrload for OnInitialized() by typing override and then a space in the code block.
Expected result: Completion list offers list of methods to override like it does in VS
Actual result: No completion list
Workaround: Start typing the desired method to override.
Start typing OnInitialized and then select the method from the completion list.
Expected result: Method is generated with correct formatting.
Actual result: Generated override is incorrectly indented:
I've also seen some cases where I complete OnInitialized() and it only completes the method name and not the method body. But this doesn't repro reliably:
Error from the output window:
Using dotnet configured on PATH
Dotnet path: C:\Program Files\dotnet\dotnet.exe
Activating C# + C# Dev Kit + C# IntelliCode...
waiting for named pipe information from server...
[stdout] {"pipeName":"\\\\.\\pipe\\78ae940c"}
received named pipe information from server
attempting to connect client to server...
client has connected to server
[Info - 1:11:53 PM] [Program] Language server initialized
[Info - 1:11:58 PM] [WorkspaceProjectFactoryService] Project C:\Users\daroth\source\repos\BlazorApp32\BlazorApp32\BlazorApp32.csproj loaded by C# Dev Kit
[roslyn.client.completionComplexEdit] Failed to make a complex text edit for completion.
[roslyn.client.completionComplexEdit] Can't find visible document with uri.fsPath: 'c:\Users\daroth\source\repos\BlazorApp32\BlazorApp32\Components\Pages\Home.razor__virtual.cs' and uri.path: '/c:/Users/daroth/source/repos/BlazorApp32/BlazorApp32/Components/Pages/Home.razor__virtual.cs'
[roslyn.client.completionComplexEdit] URIs of all visible documents:
[roslyn.client.completionComplexEdit] - uri.fsPath: 'c:\Users\daroth\source\repos\BlazorApp32\BlazorApp32\Components\Pages\Home.razor' and uri.path: '/c:/Users/daroth/source/repos/BlazorApp32/BlazorApp32/Components/Pages/Home.razor'
Extension version: 1.3.2
VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
Item
Value
CPUs
Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz (8 x 3600)
danroth27
changed the title
Method overload completion no offered when expect in Razor file and generated code is incorrectly formatted
Method overload completion no offered when expect in Razor file and generated code is incorrectly formatted or missing method body
Jan 12, 2024
This is very likely to be an issue from the LSP server as we have the same issue as ryzngard in neovim using Roslyn. Here it doesn't work even for normal C# code, so I expect that it was somehow partially patched directly in vscode
Type: Bug
OnInitialized()
by typingoverride
and then a space in the code block.Expected result: Completion list offers list of methods to override like it does in VS
Actual result: No completion list
Workaround: Start typing the desired method to override.
OnInitialized
and then select the method from the completion list.Expected result: Method is generated with correct formatting.
Actual result: Generated override is incorrectly indented:
OnInitialized()
and it only completes the method name and not the method body. But this doesn't repro reliably:Error from the output window:
Extension version: 1.3.2
VS Code version: Code 1.85.1 (0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2, 2023-12-13T09:49:37.021Z)
OS version: Windows_NT x64 10.0.22621
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
The text was updated successfully, but these errors were encountered: