Skip to content

Commit

Permalink
Merge branch 'main' into why-locked-on-core
Browse files Browse the repository at this point in the history
  • Loading branch information
Forgind committed Apr 20, 2022
2 parents dbc4839 + 8ce9bdb commit c7eb13a
Show file tree
Hide file tree
Showing 107 changed files with 632 additions and 198 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ The current development branch is `main`. Changes in `main` will go into a futur

[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/Microsoft/msbuild/msbuild-pr?branchName=main)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=887&branchName=main)

We have forked for MSBuild 17.1 in the branch [`vs17.1`](https://github.com/Microsoft/msbuild/tree/vs17.1). Changes to that branch need special approval.
We have forked for MSBuild 17.2 in the branch [`vs17.2`](https://github.com/Microsoft/msbuild/tree/vs17.2). Changes to that branch need special approval.

[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/Microsoft/msbuild/msbuild-pr?branchName=vs17.1)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=887&branchName=vs17.1)
[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/Microsoft/msbuild/msbuild-pr?branchName=vs17.2)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=887&branchName=vs17.2)

17.0 builds from the branch [`vs17.0`](https://github.com/Microsoft/msbuild/tree/vs17.0). Only high-priority bugfixes will be considered for servicing 17.0.

Expand All @@ -24,14 +24,10 @@ We have forked for MSBuild 17.1 in the branch [`vs17.1`](https://github.com/Micr

[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/Microsoft/msbuild/msbuild-pr?branchName=vs16.11)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=887&branchName=vs16.11)

MSBuild 16.9 builds from the branch [`vs16.9`](https://github.com/dotnet/msbuild/tree/vs16.9). Only high-priority bugfixes will be considered for servicing 16.9.
MSBuild 16.9 builds from the branch [`vs16.9`](https://github.com/dotnet/msbuild/tree/vs16.9). Only very-high-priority bugfixes will be considered for servicing 16.9.

[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/Microsoft/msbuild/msbuild-pr?branchName=vs16.9)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=887&branchName=vs16.9)

MSBuild 16.7 builds from the branch [`vs16.7`](https://github.com/dotnet/msbuild/tree/vs16.7). Only high-priority bugfixes will be considered for servicing 16.7.

[![Build Status](https://dev.azure.com/dnceng/public/_apis/build/status/Microsoft/msbuild/msbuild-pr?branchName=vs16.7)](https://dev.azure.com/dnceng/public/_build/latest?definitionId=887&branchName=vs16.7)

MSBuild 15.9 builds from the branch [`vs15.9`](https://github.com/dotnet/msbuild/tree/vs15.9). Only very-high-priority bugfixes will be considered for servicing 15.9.

## Building
Expand Down
20 changes: 17 additions & 3 deletions eng/BootStrapMSBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<PropertyGroup>
<BootstrapDestination>$(ArtifactsBinDir)bootstrap\</BootstrapDestination>
<BootstrapDestination Condition="'$(Platform)' == 'x64'">$(BootstrapDestination)$(Platform)\</BootstrapDestination>
<BootstrapDestination Condition="'$(Platform)' == 'x64' or '$(Platform)' == 'arm64'">$(BootstrapDestination)$(Platform)\</BootstrapDestination>
<BootstrapDestination>$(BootstrapDestination)$(TargetFramework.ToLowerInvariant())\MSBuild\</BootstrapDestination>

<!-- TODO: Mono build should use BootstrapNetCore logic -->
Expand All @@ -21,7 +21,7 @@

<Target Name="Bootstrap" DependsOnTargets="$(BootstrapDependsOn)"
AfterTargets="AfterBuild"
Condition="'$(CreateBootstrap)' == 'true'"/>
Condition="'$(CreateBootstrap)' != 'false'"/>

<Target Name="CleanBootstrapFolder">
<!-- This sometimes fails so it might need be retried. -->
Expand Down Expand Up @@ -79,7 +79,8 @@
<ShimTargets Include="Workflow.Targets" />
<ShimTargets Include="Workflow.VisualBasic.Targets" />

<InstalledMicrosoftExtensions Include="$(MSBuildExtensionsPath)\Microsoft\**\*.*" />
<InstalledMicrosoftExtensions Include="$(MSBuildExtensionsPath)\Microsoft\**\*.*"
Exclude="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\NodeJs\**" />

<InstalledNuGetFiles Include="$(MSBuildExtensionsPath)\Microsoft\NuGet\*" />

Expand All @@ -100,6 +101,13 @@
<FreshlyBuiltBinariesx64 Include="$(MSBuildTaskHostX64BinPath)**\*.exe.config" />
<FreshlyBuiltBinariesx64 Include="$(X64BinPath)**\*.dll.config" />

<FreshlyBuiltBinariesArm64 Include="$(X64BinPath)\Microsoft.Build.Tasks.Core.dll" />
<FreshlyBuiltBinariesArm64 Include="$(Arm64BinPath)**\*.exe" />
<FreshlyBuiltBinariesArm64 Include="$(Arm64BinPath)**\*.tlb" />
<FreshlyBuiltBinariesArm64 Include="$(Arm64BinPath)**\*.pdb" />
<FreshlyBuiltBinariesArm64 Include="$(Arm64BinPath)**\*.exe.config" />
<FreshlyBuiltBinariesArm64 Include="$(Arm64BinPath)**\*.dll.config" />

<FreshlyBuiltRootProjects Include="$(OutputPath)Microsoft.Common.props" />
<FreshlyBuiltRootProjects Include="$(OutputPath)Microsoft.VisualStudioVersion.*.Common.props" />
<FreshlyBuiltProjects Include="$(OutputPath)**\*props" Exclude="@(FreshlyBuiltRootProjects)" />
Expand Down Expand Up @@ -155,13 +163,19 @@
<Copy SourceFiles="@(FreshlyBuiltBinariesx64)"
DestinationFiles="@(FreshlyBuiltBinariesx64 -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\Bin\amd64\%(RecursiveDir)%(Filename)%(Extension)')" />

<!-- Copy our binaries to the arm64 location. -->
<Copy SourceFiles="@(FreshlyBuiltBinariesArm64)"
DestinationFiles="@(FreshlyBuiltBinariesArm64 -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\Bin\arm64\%(RecursiveDir)%(Filename)%(Extension)')" />

<!-- Copy our freshly-built props and targets, overwriting anything we copied from the machine -->
<Copy SourceFiles="@(FreshlyBuiltRootProjects)"
DestinationFiles="@(FreshlyBuiltRootProjects -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\%(Filename)%(Extension)')" />
<Copy SourceFiles="@(FreshlyBuiltProjects)"
DestinationFiles="@(FreshlyBuiltProjects -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\Bin\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(FreshlyBuiltProjects)"
DestinationFiles="@(FreshlyBuiltProjects -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\Bin\amd64\%(RecursiveDir)%(Filename)%(Extension)')" />
<Copy SourceFiles="@(FreshlyBuiltProjects)"
DestinationFiles="@(FreshlyBuiltProjects -> '$(BootstrapDestination)$(TargetMSBuildToolsVersion)\Bin\arm64\%(RecursiveDir)%(Filename)%(Extension)')" />

</Target>

Expand Down
14 changes: 5 additions & 9 deletions eng/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,22 @@
<PackageReference Update="Microsoft.CodeAnalysis.Build.Tasks" Version="$(MicrosoftNetCompilersToolsetVersion)" />
<PackageReference Update="Microsoft.CodeAnalysis.Collections" Version="4.2.0-1.22102.8" />
<PackageReference Update="Microsoft.DotNet.XUnitExtensions" Version="$(MicrosoftDotNetXUnitExtensionsVersion)" />
<PackageReference Update="Microsoft.IO.Redist" Version="6.0.0" />
<PackageReference Update="Microsoft.IO.Redist" Version="$(MicrosoftIORedistVersion)" />
<PackageReference Update="Microsoft.Net.Compilers.Toolset" Version="$(MicrosoftNetCompilersToolsetVersion)" />
<PackageReference Update="Microsoft.Win32.Registry" Version="4.3.0" />
<PackageReference Update="NuGet.Build.Tasks" Version="$(NuGetBuildTasksVersion)" />
<PackageReference Update="NuGet.Frameworks" Version="$(NuGetBuildTasksVersion)" />
<PackageReference Update="System.CodeDom" Version="4.4.0" />
<PackageReference Update="System.Collections.Immutable" Version="5.0.0" />
<PackageReference Update="System.Configuration.ConfigurationManager" Version="4.7.0" />
<PackageReference Update="System.Net.Http" Version="4.3.4" />
<PackageReference Update="System.Memory" Version="4.5.4" />
<PackageReference Update="System.Reflection.Metadata" Version="1.6.0" />
<PackageReference Update="System.Resources.Extensions" Version="$(SystemResourcesExtensionsPackageVersion)" />
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Version="6.0.0" />
<PackageReference Update="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Update="System.Security.Cryptography.Xml" Version="4.7.0" />
<PackageReference Update="System.Runtime.CompilerServices.Unsafe" Version="$(SystemRuntimeCompilerServicesUnsafeVersion)" />
<PackageReference Update="System.Security.Permissions" Version="4.7.0" />
<PackageReference Update="System.Security.Principal.Windows" Version="4.7.0" />
<PackageReference Update="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Update="System.Text.Encoding.CodePages" Version="4.0.1" />
<PackageReference Update="System.Text.Json" Version="6.0.0" />
<PackageReference Update="System.Threading.Tasks.Dataflow" Version="6.0.0" />
<PackageReference Update="System.Text.Json" Version="$(SystemTextJsonVersion)" />
<PackageReference Update="System.Threading.Tasks.Dataflow" Version="$(SystemThreadingTasksDataflowVersion)" />
<PackageReference Update="xunit.assert" Version="$(XUnitVersion)" />
<PackageReference Update="xunit.console" Version="$(XUnitVersion)" />
<PackageReference Update="xunit.core" Version="$(XUnitVersion)" />
Expand Down
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<Dependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22161.1">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.22212.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>879df783283dfb44c7653493fdf7fd7b07ba6b01</Sha>
<Sha>1a6b24397e50146d0fece9cfb9c0b87275691e6f</Sha>
<SourceBuild RepoName="arcade" ManagedOnly="true" />
</Dependency>
<Dependency Name="NuGet.Build.Tasks" Version="6.1.0-rc.103">
<Dependency Name="NuGet.Build.Tasks" Version="6.2.0-preview.2.109">
<Uri>https://github.com/nuget/nuget.client</Uri>
<Sha>f1906d3d581e0ea0bdd282134208d654f8447880</Sha>
<Sha>919c7e10ebdcc43235c36cf0b72c389d741835a8</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.2.0-2.22159.10">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.2.0-4.22208.7">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>f3a5bad242b7a7b8149ae644de0a61c2f1bffc8d</Sha>
<Sha>9a3459303679328da9ccc529888e3c576ce3efec</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.22161.1">
<Dependency Name="Microsoft.DotNet.XUnitExtensions" Version="6.0.0-beta.22212.5">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>879df783283dfb44c7653493fdf7fd7b07ba6b01</Sha>
<Sha>1a6b24397e50146d0fece9cfb9c0b87275691e6f</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
12 changes: 8 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the MIT license. See License.txt in the project root for full license information. -->
<Project>
<PropertyGroup>
<VersionPrefix>17.2.0</VersionPrefix>
<VersionPrefix>17.3.0</VersionPrefix>
<AssemblyVersion>15.1.0.0</AssemblyVersion>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<DotNetUseShippingVersions>true</DotNetUseShippingVersions>
Expand Down Expand Up @@ -32,10 +32,14 @@
<!-- DotNetCliVersion MUST match the dotnet version in global.json.
Otherwise, this version of dotnet will not be installed and the build will error out. -->
<DotNetCliVersion>$([System.Text.RegularExpressions.Regex]::Match($([System.IO.File]::ReadAllText('$(MSBuildThisFileDirectory)..\global.json')), '"dotnet": "([^"]*)"').Groups.get_Item(1))</DotNetCliVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.22161.1</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftDotNetXUnitExtensionsVersion>6.0.0-beta.22212.5</MicrosoftDotNetXUnitExtensionsVersion>
<MicrosoftExtensionsDependencyModelVersion>6.0.0-preview.2.21154.6</MicrosoftExtensionsDependencyModelVersion>
<MicrosoftNetCompilersToolsetVersion>4.2.0-2.22159.10</MicrosoftNetCompilersToolsetVersion>
<NuGetBuildTasksVersion>6.1.0-rc.103</NuGetBuildTasksVersion>
<MicrosoftIORedistVersion>6.0.0</MicrosoftIORedistVersion>
<MicrosoftNetCompilersToolsetVersion>4.2.0-4.22208.7</MicrosoftNetCompilersToolsetVersion>
<NuGetBuildTasksVersion>6.2.0-preview.2.109</NuGetBuildTasksVersion>
<SystemRuntimeCompilerServicesUnsafeVersion>6.0.0</SystemRuntimeCompilerServicesUnsafeVersion>
<SystemTextJsonVersion>6.0.0</SystemTextJsonVersion>
<SystemThreadingTasksDataflowVersion>6.0.0</SystemThreadingTasksDataflowVersion>
</PropertyGroup>
<Target Name="OverrideArcadeFileVersion" AfterTargets="_InitializeAssemblyVersion">
<!-- See https://github.com/dotnet/arcade/issues/3386
Expand Down
4 changes: 2 additions & 2 deletions eng/common/templates/steps/source-build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions eng/dependabot/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,21 @@
<PackageReference Update="LargeAddressAware" Version="1.0.5" />
<PackageReference Update="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.3" />
<PackageReference Update="Microsoft.VisualStudio.SDK.EmbedInteropTypes" Version="15.0.36" />
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.0.4496" PrivateAssets="All" />
<PackageReference Update="Microsoft.VisualStudio.Setup.Configuration.Interop" Version="3.1.2196" PrivateAssets="All" />
<PackageReference Update="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Update="PdbGit" Version="3.0.41" />
<PackageReference Update="Shouldly" Version="3.0.0" />
<PackageReference Update="System.CodeDom" Version="4.4.0" />
<PackageReference Update="System.Private.Uri" Version="4.3.2" />
<PackageReference Update="System.Runtime" Version="4.3.1" />
<PackageReference Update="System.Security.Cryptography.Pkcs" Version="4.7.0" />
<PackageReference Update="System.Security.Cryptography.Xml" Version="4.7.0" />
<PackageReference Update="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
</ItemGroup>

<ItemGroup Condition="'$(DotNetBuildFromSource)' != 'true' AND $(ProjectIsDeprecated) != 'true'">
<GlobalPackageReference Include="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.3" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.354" PrivateAssets="all"/>
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all"/>
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"msbuild-sdks": {
"Microsoft.Build.CentralPackageVersions": "2.0.1",
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22161.1"
"Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.22212.5"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using System.Xml;

using Microsoft.Build.Construction;
using Shouldly;
using Xunit;

#nullable disable
Expand Down Expand Up @@ -70,6 +71,49 @@ public void ReadItemGroupTwoItems()
Assert.Equal("i2", items[1].Include);
}

[Fact]
public void DeepCopyFromItemGroupWithMetadata()
{
string content = @"
<Project>
<ItemGroup>
<i Include='i1'>
<M>metadataValue</M>
</i>
<i Include='i2'>
<M>
<Some>
<Xml With='Nesting' />
</Some>
</M>
</i>
</ItemGroup>
</Project>
";

ProjectRootElement project = ProjectRootElement.Create(XmlReader.Create(new StringReader(content)));
ProjectItemGroupElement group = (ProjectItemGroupElement)Helpers.GetFirst(project.Children);

ProjectRootElement newProject = ProjectRootElement.Create();
ProjectItemGroupElement newItemGroup = project.AddItemGroup();

newItemGroup.DeepCopyFrom(group);

var items = Helpers.MakeList(newItemGroup.Items);

items.Count.ShouldBe(2);

items[0].Include.ShouldBe("i1");
ProjectMetadataElement metadataElement = items[0].Metadata.ShouldHaveSingleItem();
metadataElement.Name.ShouldBe("M");
metadataElement.Value.ShouldBe("metadataValue");

items[1].Include.ShouldBe("i2");
metadataElement = items[1].Metadata.ShouldHaveSingleItem();
metadataElement.Name.ShouldBe("M");
metadataElement.Value.ShouldBe("<Some><Xml With=\"Nesting\" /></Some>");
}

/// <summary>
/// Set the condition value
/// </summary>
Expand Down
3 changes: 3 additions & 0 deletions src/Build.UnitTests/BuildEnvironmentHelper_Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ public void BuildEnvironmentFindsAmd64()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/msbuild/issues/7552", TargetFrameworkMonikers.Any)]
[PlatformSpecific(TestPlatforms.Windows)]
public void BuildEnvironmentFindsAmd64RunningInAmd64NoVS()
{
Expand All @@ -386,6 +387,7 @@ public void BuildEnvironmentFindsAmd64RunningInAmd64NoVS()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/msbuild/issues/7552", TargetFrameworkMonikers.Any)]
[PlatformSpecific(TestPlatforms.Windows)]
public void BuildEnvironmentFindsAmd64NoVS()
{
Expand All @@ -401,6 +403,7 @@ public void BuildEnvironmentFindsAmd64NoVS()
}

[Fact]
[ActiveIssue("https://github.com/dotnet/msbuild/issues/7552", TargetFrameworkMonikers.Any)]
[SkipOnTargetFramework(TargetFrameworkMonikers.Netcoreapp, "No Visual Studio install for netcore")]
[PlatformSpecific(TestPlatforms.Windows)]
public void BuildEnvironmentFindsAmd64RunningInAmd64()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal class NodeEndpointOutOfProc : NodeEndpointOutOfProcBase
/// </summary>
protected override Handshake GetHandshake()
{
return new Handshake(CommunicationsUtilities.GetHandshakeOptions(taskHost: false, is64Bit: EnvironmentUtilities.Is64BitProcess, nodeReuse: _enableReuse, lowPriority: _lowPriority));
return new Handshake(CommunicationsUtilities.GetHandshakeOptions(taskHost: false, architectureFlagToSet: XMakeAttributes.GetCurrentMSBuildArchitecture(), nodeReuse: _enableReuse, lowPriority: _lowPriority));
}

#region Structs
Expand Down

0 comments on commit c7eb13a

Please sign in to comment.