Merge pull request #10702 from dotnet-maestro-bot/merge/release/5.0.3xx-to-main

[automated] Merge branch 'release/5.0.3xx' => 'main'
This commit is contained in:
Sarah Oslund 2021-05-24 16:16:44 -07:00 committed by GitHub
commit 8dec355e47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 1 deletions

View file

@ -29,9 +29,14 @@
<!-- Don't include .NET Core MS.NET.Build.Extensions tasks in Full Framework MSBuild layout -->
<VSMSBuildExtensionsContent Remove="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\tools\netcoreapp*\**" />
<VSMSBuildExtensionsContent Remove="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions\Microsoft\Microsoft.NET.Build.Extensions\tools\net*.*\**" />
<VSMSBuildExtensionsContent Include="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions-ver\**\*.*"
DeploymentSubpath="msbuildExtensions-ver/"/>
<!-- Don't include .NET Core targets in the Full Framework MSBuild layout-->
<VSMSBuildExtensionsContent Remove="$(MSBuildExtensionsNuPkgPath)\msbuildExtensions-ver\SolutionFile\**" />
<VSMSBuildExtensionsContent Include="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.*"
Exclude="$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.props;$(NETStandardLibraryNETFrameworkNuPkgPath)\build\**\*.targets"
DeploymentSubpath="msbuildExtensions/Microsoft/Microsoft.NET.Build.Extensions/" />

View file

@ -3,6 +3,7 @@
using System;
using System.IO;
using System.Xml.Linq;
using EndToEnd;
using FluentAssertions;
using Microsoft.DotNet.Tools.Test.Utilities;
@ -48,7 +49,24 @@ namespace Microsoft.DotNet.Tests.EndToEnd
testProjectCreator.AdditionalProperties["OutputType"] = "exe";
testProjectCreator.AdditionalProperties["RuntimeIdentifier"] = Rid;
var testInstance = testProjectCreator.Create();
// At certain point of the release cycle LatestRuntimeFrameworkVersion in eng folder may not exist on the nuget feed
static void overrideLastRuntimeFrameworkVersionToExistingOlderVersion(XDocument project)
{
XNamespace ns = project.Root.Name.Namespace;
var target = XElement.Parse(@" <ItemGroup>
<KnownFrameworkReference Update=""@(KnownFrameworkReference)"">
<LatestRuntimeFrameworkVersion Condition=""'%(TargetFramework)' == 'netcoreapp3.1'"">3.1.10</LatestRuntimeFrameworkVersion>
</KnownFrameworkReference>
<KnownAppHostPack Update=""@(KnownAppHostPack)"">
<AppHostPackVersion Condition=""'%(TargetFramework)' == 'netcoreapp3.1'"">3.1.10</AppHostPackVersion>
</KnownAppHostPack>
</ItemGroup>");
target.Name = ns + target.Name.LocalName;
project.Root.Add(target);
}
TestFramework.TestAssetInstance testInstance
= testProjectCreator.Create().WithProjectChanges(overrideLastRuntimeFrameworkVersionToExistingOlderVersion);
new PublishCommand()
.WithWorkingDirectory(testInstance.Root.FullName)