razor icon indicating copy to clipboard operation
razor copied to clipboard

Tests using the C# language server don't appear to Roslyn as having come from Razor

Open davidwengier opened this issue 3 years ago • 2 comments

See https://github.com/dotnet/razor-tooling/blob/0ee3665a524a8a720cb5660b7f3e5945c8169f90/src/Razor/test/Microsoft.AspNetCore.Razor.LanguageServer.Test/AutoInsert/OnAutoInsertEndpointTest.cs#L356

Currently the RazorLanguageServerFactoryWrapper in Roslyn just uses MEF to get a LanguageServerFactory, but that means it gets the CSharpVB one, which is hardcoded to the CSharpVB server kind (https://github.com/dotnet/roslyn/blob/main/src/Features/LanguageServer/Protocol/CSharpVisualBasicLanguageServerFactory.cs#L42) so some specific Razor features can't be tested (eg, brace completion newlines in OnAutoInsert: https://github.com/dotnet/roslyn/blob/main/src/Features/LanguageServer/Protocol/Handler/OnAutoInsert/OnAutoInsertHandler.cs#L82)

davidwengier avatar Sep 07 '22 02:09 davidwengier

Has this issue been fixed by dotnet/roslyn/pull/64642 ?

adrianwright109 avatar Oct 18 '22 17:10 adrianwright109

That's the "fix", but we still need to consume a version of Roslyn that has it, and un-skip the test

davidwengier avatar Oct 18 '22 17:10 davidwengier

😁

davidwengier avatar Nov 10 '22 23:11 davidwengier