-
-
Notifications
You must be signed in to change notification settings - Fork 731
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
Do not set /m parameter for MSBuild by default #1104
Comments
@ravensorb Have you ran Cake with diagnostic verbosity, found the msbuild command it is using, and then tried running that directly? |
@ravensorb does that work? If so, what is different between you running manually? |
yes -- the log file attached shows a failed build. I have tracked it down the the "/m" as I mentioned in the write up. It is possible that this is actually an msbuild issue. I am going to try to set MaxCpu to 0 in my MSBuildSettings next |
@ravensorb make sure you're running same version of MSBuild too, you can set toolversion via the settings. |
Off the top of my head, I am not familiar with the "/m" flag. What is it? And how is it getting set? |
So are you setting that in your cake file? On phone just now, so hard to check. |
@gep13 seems like default behavior of cake is to set the /m option. I am going to override it and see if that helps right now |
@ravensorb so, looks like this value is set by default: https://github.com/cake-build/cake/blob/develop/src/Cake.Common/Tools/MSBuild/MSBuildRunner.cs#L55 either to just |
@cake-build/team should the following:
be:
|
@gep13 I believe a /m on its own will use all possible CPUs. There should be a way to "remove" the /m if needed (maybe set MaxCpuCount = -1 or make it a nullable type (null don't include, 0 include /m on its own, anything else try as an actual number)? |
@ravensorb yes, however, surely |
We can probably make it nullable (don't set if null) and make zero mean What do you think? |
@gep13 not sure yet -- still testing. That will be one of the tests I run and I'll let you know what the result it. |
@patriksvensson I would agree |
Me too. |
@ravensorb would you be in a position to submit a PR? @patriksvensson should this be a hotfix? |
@gep13 Not against it being a hotfix, but since it wasn't introduced in 0.14.0, perhaps it's better to include it in 0.15.0. That is if there's a workaround that solves the issue. What do you think? |
Makes sense to me :-) |
Using the following
Seems to work -- everything compiles now. I have also submitted an issue on the msbuild git repository |
What You Are Seeing?
Xamarin based projects are not compiling correctly. Either SDK files are not found or Android packages are not downloading correctly on a clean build server with minimal build tools installed.
Note: This works perfectly if I execute msbuild manually on exact same system
and
I have also replicated this on both a Windows 10 (Build 1511 base) and a Windows 2016 Tap 5 build server.
It seems that there is something that cake is doing when it executes msbuild that is resulting in the error.
What is Expected?
Build should work as expected. if I run msbuild manually it works 100% of the time on a clean system
What version of Cake are you using?
Tried
Are you running on a 32 or 64 bit system?
64What environment are you running on? Windows? Linux? Mac?
Are you running on a CI Server? If so, which one?
https://ci.appveyor.com/project/xlabs/xamarin-forms-labs-hva8p/build/2.3.0.3.master
How Did You Get This To Happen? (Steps to Reproduce)
Test 1
Windows 2012 R2
Test 2
Windows 2012 R2
!(AndroidSDKInstall)[https://i.imgur.com/T76dTVv.png]
!(MissingComponents)[https://i.imgur.com/fkWOYAx.png]
Test 3
Windows 2012 R2
Test 4
Windows 2012 R2
The issue seems to be related to the /m property
Link to GitHub Repository
Output Log
cakebuild-20160723-0706.txt
The text was updated successfully, but these errors were encountered: