Skip to content

Commit

Permalink
Only care about FSharp.Core not loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
nojaf committed Oct 25, 2023
1 parent 472c41c commit 60cf0a2
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/FSharp.Analyzers.Cli/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -274,17 +274,17 @@ let main argv =
}

AssemblyLoadContext.Default.add_Resolving (fun ctx assemblyName ->
if assemblyName.Name = "FSharp.Core" then
let msg =
$"""Could not load FSharp.Core %A{assemblyName.Version}. The expected assembly version of FSharp.Core is %A{Utils.currentFSharpCoreVersion}.
Consider adding <PackageReference Update="FSharp.Core" Version="<CorrectVersion>" /> to your .fsproj.
The correct version can be found over at https://www.nuget.org/packages/FSharp.Analyzers.SDK#dependencies-body-tab.
"""

printError msg
if assemblyName.Name <> "FSharp.Core" then
null
else
printError $"Could not load %s{assemblyName.Name} %A{assemblyName.Version}."

let msg =
$"""Could not load FSharp.Core %A{assemblyName.Version}. The expected assembly version of FSharp.Core is %A{Utils.currentFSharpCoreVersion}.
Consider adding <PackageReference Update="FSharp.Core" Version="<CorrectVersion>" /> to your .fsproj.
The correct version can be found over at https://www.nuget.org/packages/FSharp.Analyzers.SDK#dependencies-body-tab.
"""

printError msg
exit 1
)

Expand Down

0 comments on commit 60cf0a2

Please sign in to comment.