Turn off multi-proc building of the test .sln to work around "cannot access file becuase it is being used by another process" errors.
This commit is contained in:
parent
d4153815d5
commit
f6b0196b0f
2 changed files with 15 additions and 2 deletions
|
@ -81,6 +81,7 @@
|
|||
<Target Name="BuildTests"
|
||||
DependsOnTargets="RestoreTests;">
|
||||
<DotNetBuild ToolPath="$(Stage0Directory)"
|
||||
MaxCpuCount="1"
|
||||
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln"" />
|
||||
</Target>
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()}"; }
|
||||
get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()} {GetMaxCpuCount()}"; }
|
||||
}
|
||||
|
||||
public string BuildBasePath { get; set; }
|
||||
|
@ -27,6 +27,8 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
public string OutputPath { get; set; }
|
||||
|
||||
public string MaxCpuCount { get; set; }
|
||||
|
||||
private string GetOutputPath()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(OutputPath))
|
||||
|
@ -76,5 +78,15 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
return null;
|
||||
}
|
||||
|
||||
private string GetMaxCpuCount()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(MaxCpuCount))
|
||||
{
|
||||
return $"/maxcpucount:{MaxCpuCount}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue