Skip to content

Commit

Permalink
Yet another SdkAssemblyResolver fix (#2835)
Browse files Browse the repository at this point in the history
Fixes SDK version selection
  • Loading branch information
Thorium authored Sep 26, 2024
1 parent e36d8be commit 04c2b47
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/app/Fake.Runtime/SdkAssemblyResolver.fs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,22 @@ type SdkAssemblyResolver(logLevel: Trace.VerboseLevel) =

match net60releases with
| None -> []
| Some versions -> versions |> List.filter sdkRelease
| Some versions ->
match versions |> List.filter sdkRelease with
| [] ->

Trace.traceFAKE $"No exact match of product releases {version.ToString()} found."

match versions |> List.filter (fun release -> release.Version.Major = version.Major) with
| [] ->
Trace.traceFAKE
$"No product release found for {version.ToString()}. Maybe a pre-release? Returning all the versions."

versions
| majorMatch ->
Trace.traceFAKE $".NET {version.Major} product releases returned."
majorMatch
| foundMatch -> foundMatch

member this.GetProductReleaseForSdk(version: ReleaseVersion) =
this.GetProductReleasesForSdk version |> List.tryHead
Expand Down

0 comments on commit 04c2b47

Please sign in to comment.