-
Notifications
You must be signed in to change notification settings - Fork 73
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
Original message: The type 'IServer' is required here and is unavailable. #575
Comments
Actually, that wasn't entirely correct. A working workaround is to add the redundant, transient dependency by hand. |
Hey Abel, thanks for filing this bug and providing a workaround.
You mean the version contained in the text "Microsoft.AspNetCore.Hosting.Server.Abstractions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"? Unfortunately, the culprit with that issue might just be that the version listed in the nuget package is not the same as the ASSEMBLY version. This happens quite often in many libraries :( |
@knocte ah, yes, that makes sense (re version weirdness) |
@abelbraaksma hello Abel, we have a new prerelease that is completely transitioned to .net6.0 and I have the feeling that it might have some impact on this bug. Do you mind upgrading to it and re-testing? |
(The latest pre-release: https://www.nuget.org/packages/dotnet-fsharplint/0.23.1--date20231228-0934.git-e8d2697 ) |
I'll give it a go, I'd love to use it again! Great work! |
Description
When checking for
redunant 'new' keyword
, FSharpLint can throw when dependencies aren't readily available. I'm not quite sure how to make a minimal repro, but it basically seems that FSL doesn't get all dependencies properly.Normal compile is fine, as is running, so all dependencies are resolves properly by F#.
Repro steps
Not sure, this is a rather large project, but I'll try to make a smallish repro, unless the reflection-walk in the offending code has a clear location where this goes haywire.
Expected behavior
No error
Actual behavior
Getting this error:
Known workarounds
None
Related information
Latest FSharpLint, F# 6.0, .NET 6.0, Windows
The text was updated successfully, but these errors were encountered: