Closed 0101 closed 1 month ago
It might be caused by https://github.com/dotnet/fsharp/pull/16168 as well
Referenced Microsoft.Extensions.DependencyInjection.Abstractions
contains two extension methods with the same name AddSingleton
and parameters count, but different number of generics
public static IServiceCollection AddSingleton<TService>(this IServiceCollection services)
public static IServiceCollection AddSingleton<TService, TImplementation>(this IServiceCollection services)
I think issue localized in this change from https://github.com/dotnet/fsharp/pull/17597
which triggers additional call of resolveILMethodRefWithRescope
, which doesn't take generics into account when searching for methods, and therefore returns an error.
I managed to build the FSharp.Compiler.LanguageServer
project locally after the revert of https://github.com/dotnet/fsharp/pull/17597
This makes sense Alex @DedSec256 , thanks. I will adjust that change. Surprisingly, resolveILMethodRefWithRescope is not new a was already used at different places before.
@T-Gro hello, could you tell how can check the fix? In RC2 I get something like this
Yes, RC2 has this error. It has been fixed for the shipping version of the product and is fixed in code. But RC2 has it.
I'm having similar error after updating to latest VS2022 Prerelease v5, 9.0.100-rc.2.24474.11 In Prerelease 2.1 I didn't have this.
Edit: @xperiandri pointed out that having a global.json to hard-code a previous version does help.
Please provide a succinct description of the issue.
Repro steps
Provide the steps required to reproduce the problem:
lsp
branchbuild.cmd -c Debug
or just buildFSharp.Compiler.LanguageServer
projectExpected behavior
Build completes successfully
Actual behavior
We get
Related information
Here's the code that triggers the error: https://github.com/dotnet/fsharp/blob/c1486be9a7db235018a27e8c3219309a10895891/src/FSharp.Compiler.LanguageServer/FSharpLanguageServer.fs#L46-L59