Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Msbuild max cpu (updated) #2789

Merged
merged 4 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 6.1.0 - 2024-07-27
* BUGFIX: MSBuild.build adds a bad string at the end of properties, thanks @0x53A - https://github.com/fsprojects/FAKE/issues/2738
* BUGFIX: Allow setting Msbuild max cpu on Linux, thanks @TheAngryByrd - https://github.com/fsprojects/FAKE/pull/2772
* ENHANCEMENT: Added shorthash to git functions, thanks @voronoipotato - https://github.com/fsprojects/FAKE/pull/2752
* ENHANCEMENT: Support for `/tl:[auto:on:off]` msbuild flag, thanks @smoothdeveloper - https://github.com/fsprojects/FAKE/pull/2768
* ENHANCEMENT: Fixes for usage in .NET 8.0 enviroment projects.
Expand Down
7 changes: 3 additions & 4 deletions src/app/Fake.DotNet.MSBuild/MSBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -885,10 +885,9 @@ module MSBuild =

[ yield restoreFlag
yield targets
if not Environment.isUnix then
yield maxCpu
yield noLogo
yield nodeReuse
yield maxCpu
yield noLogo
yield nodeReuse
yield
(match p.TerminalLogger with
| MSBuildTerminalLoggerOption.Off -> Some("tl", "off")
Expand Down
17 changes: 3 additions & 14 deletions src/test/Fake.Core.UnitTests/Fake.DotNet.MSBuild.fs
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ let tests =
else
expected.Trim()

let expected =
if Environment.isUnix then
$"{expected} /p:RestorePackages=False".Trim()
else
$"/m /nodeReuse:False {expected} /p:RestorePackages=False".Trim()
let expected = $"/m /nodeReuse:False {expected} /p:RestorePackages=False".Trim()

Expect.equal cmdLine expected $"Expected a given cmdLine '{expected}', but got '{cmdLine}'."

Expand All @@ -36,10 +32,7 @@ let tests =
Properties = [ "OutputPath", "C:\\Test\\" ] })

let expected =
if Environment.isUnix then
"/p:RestorePackages=False /p:OutputPath=C:%5CTest%5C"
else
"/m /nodeReuse:False /p:RestorePackages=False /p:OutputPath=C:%5CTest%5C"
"/m /nodeReuse:False /p:RestorePackages=False /p:OutputPath=C:%5CTest%5C"

Expect.equal cmdLine expected "Expected a given cmdline."
testCase "Test that /restore is included #2160"
Expand All @@ -50,11 +43,7 @@ let tests =
ConsoleLogParameters = []
DoRestore = true })

let expected =
if Environment.isUnix then
"/restore /p:RestorePackages=False"
else
"/restore /m /nodeReuse:False /p:RestorePackages=False"
let expected = "/restore /m /nodeReuse:False /p:RestorePackages=False"

Expect.equal cmdLine expected "Expected a given cmdline."

Expand Down
Loading