Open abelbraaksma opened 1 year ago
Actually, that wasn't entirely correct. A working workaround is to add the redundant, transient dependency by hand. Do note, though, that the reported version number in the error is wrong, but at least the error is gone now.
Hey Abel, thanks for filing this bug and providing a workaround.
Do note, though, that the reported version number in the error is wrong
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