Work around build test.sln
race condition until fixed (#5490)
* Remove GenerateRuntimeConfigurationFiles from this library * Disable parallel build of test.sln * PR feedback
This commit is contained in:
parent
c9a227d164
commit
ba69c88c79
9 changed files with 58 additions and 45 deletions
|
@ -82,7 +82,8 @@
|
|||
<Target Name="BuildTests"
|
||||
DependsOnTargets="RestoreTests;">
|
||||
<DotNetBuild ToolPath="$(Stage0Directory)"
|
||||
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln"" />
|
||||
ProjectPath=""$(TestDirectory)/Microsoft.DotNet.Cli.Tests.sln""
|
||||
MaxCpuCount="1" />
|
||||
</Target>
|
||||
|
||||
<Target Name="CreateTestAssetPackageNuPkgs"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetBuild : DotNetTool
|
||||
public class DotNetBuild : DotNetMSBuildTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()}"; }
|
||||
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetRuntime()} {GetOutputPath()}"; }
|
||||
}
|
||||
|
||||
public string BuildBasePath { get; set; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetMSBuild : DotNetTool
|
||||
public class DotNetMSBuild : DotNetMSBuildTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetArguments()}"; }
|
||||
get { return $"{base.Args} {GetArguments()}"; }
|
||||
}
|
||||
|
||||
public string Arguments { get; set; }
|
||||
|
|
32
build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
Normal file
32
build_projects/dotnet-cli-build/DotNetMSBuildTool.cs
Normal file
|
@ -0,0 +1,32 @@
|
|||
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
using Microsoft.Build.Framework;
|
||||
using Microsoft.Build.Utilities;
|
||||
|
||||
using Microsoft.DotNet.Cli.Build.Framework;
|
||||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public abstract class DotNetMSBuildTool : DotNetTool
|
||||
{
|
||||
public int MaxCpuCount {get; set;} = 0;
|
||||
|
||||
protected override string Args
|
||||
{
|
||||
get
|
||||
{
|
||||
return $"{GetMaxCpuCountArg()}";
|
||||
}
|
||||
}
|
||||
|
||||
private string GetMaxCpuCountArg()
|
||||
{
|
||||
if (MaxCpuCount > 0)
|
||||
{
|
||||
return $"/m:{MaxCpuCount}";
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetPack : DotNetTool
|
||||
public class DotNetPack : DotNetMSBuildTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; }
|
||||
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetNoBuild()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {MsbuildArgs}"; }
|
||||
}
|
||||
|
||||
public string Configuration { get; set; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetPublish : DotNetTool
|
||||
public class DotNetPublish : DotNetMSBuildTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetNativeSubdirectory()} {GetBuildBasePath()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetMSBuildArgs()}"; }
|
||||
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetFramework()} {GetNativeSubdirectory()} {GetBuildBasePath()} {GetOutput()} {GetVersionSuffix()} {GetRuntime()} {GetMSBuildArgs()}"; }
|
||||
}
|
||||
|
||||
public string BuildBasePath { get; set; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetRestore : DotNetTool
|
||||
public class DotNetRestore : DotNetMSBuildTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
|
||||
get { return $"{base.Args} {GetProjectPath()} {GetConfigFile()} {GetSource()} {GetPackages()} {GetSkipInvalidConfigurations()} {GetRuntime()} {GetAdditionalParameters()}"; }
|
||||
}
|
||||
|
||||
public string ConfigFile { get; set; }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace Microsoft.DotNet.Cli.Build
|
||||
{
|
||||
public class DotNetTest : DotNetTool
|
||||
public class DotNetTest : DotNetMSBuildTool
|
||||
{
|
||||
protected override string Command
|
||||
{
|
||||
|
@ -12,7 +12,7 @@ namespace Microsoft.DotNet.Cli.Build
|
|||
|
||||
protected override string Args
|
||||
{
|
||||
get { return $"{GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; }
|
||||
get { return $"{base.Args} {GetProjectPath()} {GetConfiguration()} {GetLogger()} {GetNoBuild()}"; }
|
||||
}
|
||||
|
||||
public string Configuration { get; set; }
|
||||
|
|
|
@ -1,49 +1,29 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
|
||||
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp1.1</TargetFramework>
|
||||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
|
||||
<AssemblyName>Msbuild.Tests.Utilities</AssemblyName>
|
||||
<PackageTargetFallback Condition=" '$(TargetFramework)' == 'netcoreapp1.1' ">$(PackageTargetFallback);dotnet5.4;portable-net451+win8</PackageTargetFallback>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.DotNet.Tools.Tests.Utilities\Microsoft.DotNet.Tools.Tests.Utilities.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj">
|
||||
<FromP2P>true</FromP2P>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.TestFramework\Microsoft.DotNet.TestFramework.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.ProjectJsonMigration\Microsoft.DotNet.ProjectJsonMigration.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.Cli.Sln.Internal\Microsoft.DotNet.Cli.Sln.Internal.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj">
|
||||
<FromP2P>true</FromP2P>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.InternalAbstractions\Microsoft.DotNet.InternalAbstractions.csproj">
|
||||
<FromP2P>true</FromP2P>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.Cli.Utils\Microsoft.DotNet.Cli.Utils.csproj" />
|
||||
<ProjectReference Include="..\..\src\Microsoft.DotNet.InternalAbstractions\Microsoft.DotNet.InternalAbstractions.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'net46' ">
|
||||
<Reference Include="System.Runtime">
|
||||
<FromP2P>true</FromP2P>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NETStandard.Library">
|
||||
<Version>1.6.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Runtime.Serialization.Primitives">
|
||||
<Version>4.3.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FluentAssertions">
|
||||
<Version>4.18.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="xunit">
|
||||
<Version>2.2.0-beta4-build3444</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Build">
|
||||
<Version>$(CLI_MSBuild_Version)</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NETStandard.Library" Version="1.6.0" />
|
||||
<PackageReference Include="System.Runtime.Serialization.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="4.18.0" />
|
||||
<PackageReference Include="xunit" Version="2.2.0-beta4-build3444" />
|
||||
<PackageReference Include="Microsoft.Build" Version="$(CLI_MSBuild_Version)" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue