Open Thorium opened 7 months ago
This one is not working in the master branch either.
@Thorium does linting the solution (instead of the project file) yield a different stack trace?
No it's the same. I found the issue:
The project file has:
<TargetFrameworks>net6.0;net472;netstandard2.1</TargetFrameworks>
FSharpLint is compiled with net5.0.
If I add that to the TargetFrameworks, it works:
<TargetFrameworks>net5.0;net6.0;net472;netstandard2.1</TargetFrameworks>
FSharpLint is compiled with net5.0. If I add that to the TargetFrameworks, it works:
Ok thanks, then this is a duplicate of https://github.com/fsprojects/FSharpLint/issues/336 . Closing.
I think the problem was not .NET Framework, but rather that the project was targeting only more recent .NET than what FSharpLint uses.
Oh, oops! Reopening.
Weirdly enough I have other projects that do work with these ones:
<TargetFrameworks>net472;netstandard2.0</TargetFrameworks>
<TargetFrameworks>net48;netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net472;net6.0</TargetFrameworks>
Is is related to that FunStripe project having type providers (FSharp.Data) in it?
this has too and it works fine: https://github.com/Thorium/ClearBank.Net
It does fail for some provided types thing:
System.Exception: 'The design-time type 'System.Boolean' utilized by a type provider was not found in the target reference assembly set '[tgt assembly FSharp.Core, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;
tgt assembly System.Runtime, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a;
tgt assembly FSharp.Data.Csv.Core, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259;
tgt assembly FSharp.Data, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259;
tgt assembly FSharp.Data.Html.Core, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259;
tgt assembly FSharp.Data.Http, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259;
tgt assembly FSharp.Data.Json.Core, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259;
tgt assembly FSharp.Data.Runtime.Utilities, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259;
tgt assembly FSharp.Data.WorldBank.Core, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259;
tgt assembly FSharp.Data.Xml.Core, Version=6.2.0.0, Culture=neutral, PublicKeyToken=49286adf818aa259]'. You may be referencing a profile which contains fewer types than those needed by the type provider you are using.'
It does fail for some provided types thing:
That looks like a different bug, please file a new ticket (and I bet it's related to the fact that the project you're targetting is net7.0? judging by the 7.0 version of FSharp.Core mentioned in the error...)
That looks like a different bug, please file a new ticket
And don't delete your "minimal repro" msg please :)
F# version is not related to .net version. FunStripe uses F# 7 on .NET 6. But that's the same config that the other mentioned ClearBank.NET, which does work. The minimal repo didn't replicate the issue, so there is more going on than just the sln file.
F# version is not related to .net version.
I was not referring to F# version but to FSharp.Core (nuget pkg) version, which, in the last releases of .NET match their release dates (7.0 is released when .NET7.0 is released, etc).
Trying the tool with one sample:
Expected: Run and produce a lot of issues.
Actual: