Skip to content

Commit

Permalink
Fix build script for newer versions of dotnet.
Browse files Browse the repository at this point in the history
  • Loading branch information
NogginBops committed Feb 17, 2022
1 parent 70db5e9 commit e133865
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ let nugetCommandRunnerPath =
// Lazily install DotNet SDK in the correct version if not available
let install =
lazy
(if (DotNet.getVersion id).StartsWith "5" then id
else DotNet.install (fun options -> { options with Version = DotNet.Version "5.0.100" }))
(if (DotNet.getVersion id).StartsWith "6" then id
else DotNet.install (fun options -> { options with Version = DotNet.Version "6.0.200" }))

// Define general properties across various commands (with arguments)
let inline withWorkDir wd = DotNet.Options.lift install.Value >> DotNet.Options.withWorkingDirectory wd
Expand All @@ -139,7 +139,7 @@ let inline dotnetSimple arg = DotNet.Options.lift install.Value arg

module DotNet =
let run optionsFn framework projFile args =
DotNet.exec (dotnetSimple >> optionsFn) "run" (sprintf "-f %s -p \"%s\" %s" framework projFile args)
DotNet.exec (dotnetSimple >> optionsFn) "run" (sprintf "-f %s --project \"%s\" -- %s" framework projFile args)

let runWithDefaultOptions framework projFile args = run id framework projFile args

Expand Down

0 comments on commit e133865

Please sign in to comment.