Merged PR 4935: Bump 2.1.x and 3.0.x versions for SCD; use 3.1.0 for FDD
This commit is contained in:
commit
ac7c03ce2a
4 changed files with 29 additions and 207 deletions
|
@ -15,7 +15,9 @@
|
|||
<add key="darc-int-dotnet-core-setup-a1388f1" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-core-setup-a1388f19/nuget/v3/index.json" />
|
||||
<add key="darc-int-aspnet-AspNetCore-e276c81" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-aspnet-AspNetCore-e276c817/nuget/v3/index.json" />
|
||||
<!--End: Package sources managed by Dependency Flow automation. Do not edit the sources above.-->
|
||||
<!-- 3.0.1 assets are needed and not on nuget.org yet or other feeds below. Darc cannot see that due to nonstandard way these are pulled in to a non-3.0 branch -->
|
||||
<!-- 3.0.2 runtme pack/apphost packs are needed for tests, and not on nuget.org yet or other feeds below. Darc cannot see that due to nonstandard way these are pulled in to a non-3.0 branch -->
|
||||
<add key="darc-int-dotnet-core-setup-a2c3406" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-dotnet-core-setup-a2c3406f/nuget/v3/index.json" />
|
||||
<add key="darc-int-aspnet-AspNetCore-561deb0" value="https://pkgs.dev.azure.com/dnceng/_packaging/darc-int-aspnet-AspNetCore-561deb05/nuget/v3/index.json" />
|
||||
<add key="dotnet-core" value="https://dotnetfeed.blob.core.windows.net/dotnet-core/index.json" />
|
||||
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
<_NETStandardLibraryPackageVersion>$(NETStandardLibraryRefPackageVersion)</_NETStandardLibraryPackageVersion>
|
||||
<_NETCorePlatformsPackageVersion>$(MicrosoftNETCorePlatformsPackageVersion)</_NETCorePlatformsPackageVersion>
|
||||
|
||||
<_NETCoreApp30RuntimePackVersion>3.0.1</_NETCoreApp30RuntimePackVersion>
|
||||
<_NETCoreApp30RuntimePackVersion>3.0.2</_NETCoreApp30RuntimePackVersion>
|
||||
<_NETCoreApp30TargetingPackVersion>3.0.0</_NETCoreApp30TargetingPackVersion>
|
||||
<_WindowsDesktop30RuntimePackVersion>3.0.1</_WindowsDesktop30RuntimePackVersion>
|
||||
<_WindowsDesktop30RuntimePackVersion>3.0.2</_WindowsDesktop30RuntimePackVersion>
|
||||
<_WindowsDesktop30TargetingPackVersion>3.0.0</_WindowsDesktop30TargetingPackVersion>
|
||||
<_AspNet30RuntimePackVersion>3.0.1</_AspNet30RuntimePackVersion>
|
||||
<_AspNet30RuntimePackVersion>3.0.2</_AspNet30RuntimePackVersion>
|
||||
<_AspNet30TargetingPackVersion>3.0.1</_AspNet30TargetingPackVersion>
|
||||
|
||||
<!-- Use only major and minor in target framework version -->
|
||||
|
@ -92,7 +92,7 @@
|
|||
<ImplicitPackageVariable Include="Microsoft.NETCore.App"
|
||||
TargetFrameworkVersion="2.1"
|
||||
DefaultVersion="2.1.0"
|
||||
LatestVersion="2.1.14" />
|
||||
LatestVersion="2.1.15" />
|
||||
<ImplicitPackageVariable Include="Microsoft.NETCore.App"
|
||||
TargetFrameworkVersion="2.2"
|
||||
DefaultVersion="2.2.0"
|
||||
|
@ -100,11 +100,11 @@
|
|||
<ImplicitPackageVariable Include="Microsoft.AspNetCore.App"
|
||||
TargetFrameworkVersion="2.1"
|
||||
DefaultVersion="2.1.1"
|
||||
LatestVersion="2.1.14"/>
|
||||
LatestVersion="2.1.15"/>
|
||||
<ImplicitPackageVariable Include="Microsoft.AspNetCore.All"
|
||||
TargetFrameworkVersion="2.1"
|
||||
DefaultVersion="2.1.1"
|
||||
LatestVersion="2.1.14"/>
|
||||
LatestVersion="2.1.15"/>
|
||||
|
||||
<ImplicitPackageVariable Include="Microsoft.AspNetCore.App"
|
||||
TargetFrameworkVersion="2.2"
|
||||
|
@ -155,7 +155,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<KnownFrameworkReference Include="Microsoft.NETCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.NETCore.App"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftNETCoreAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.NETCore.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftNETCoreAppRefPackageVersion)"
|
||||
|
@ -174,7 +174,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
|
||||
|
@ -186,7 +186,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WPF"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
|
||||
|
@ -199,7 +199,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<KnownFrameworkReference Include="Microsoft.WindowsDesktop.App.WindowsForms"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.WindowsDesktop.App"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftWindowsDesktopAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.WindowsDesktop.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftWindowsDesktopAppRefPackageVersion)"
|
||||
|
@ -212,7 +212,7 @@ Copyright (c) .NET Foundation. All rights reserved.
|
|||
<KnownFrameworkReference Include="Microsoft.AspNetCore.App"
|
||||
TargetFramework="netcoreapp3.1"
|
||||
RuntimeFrameworkName="Microsoft.AspNetCore.App"
|
||||
DefaultRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppRuntimePackageVersion)"
|
||||
DefaultRuntimeFrameworkVersion="3.1.0"
|
||||
LatestRuntimeFrameworkVersion="$(MicrosoftAspNetCoreAppRuntimePackageVersion)"
|
||||
TargetingPackName="Microsoft.AspNetCore.App.Ref"
|
||||
TargetingPackVersion="$(MicrosoftAspNetCoreAppRefPackageVersion)"
|
||||
|
|
|
@ -1,195 +0,0 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml.Linq;
|
||||
using FluentAssertions;
|
||||
using Microsoft.DotNet.TestFramework;
|
||||
using Microsoft.DotNet.Tools.Test.Utilities;
|
||||
using NuGet.ProjectModel;
|
||||
using NuGet.Versioning;
|
||||
using Xunit;
|
||||
|
||||
namespace EndToEnd
|
||||
{
|
||||
public partial class GivenSelfContainedAppsRollForward : TestBase
|
||||
{
|
||||
|
||||
[Theory]
|
||||
// MemberData is used instead of InlineData here so we can access it in another test to
|
||||
// verify that we are covering the latest release of .NET Core
|
||||
[ClassData(typeof(SupportedNetCoreAppVersions))]
|
||||
public void ItRollsForwardToTheLatestNetCoreVersion(string minorVersion)
|
||||
{
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1")
|
||||
{
|
||||
// https://github.com/dotnet/core-sdk/issues/621
|
||||
return;
|
||||
}
|
||||
ItRollsForwardToTheLatestVersion(TestProjectCreator.NETCorePackageName, minorVersion);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[ClassData(typeof(SupportedAspNetCoreVersions))]
|
||||
public void ItRollsForwardToTheLatestAspNetCoreAppVersion(string minorVersion)
|
||||
{
|
||||
if (minorVersion == "3.0" || minorVersion == "3.1")
|
||||
{
|
||||
// https://github.com/dotnet/core-sdk/issues/621
|
||||
return;
|
||||
}
|
||||
ItRollsForwardToTheLatestVersion(TestProjectCreator.AspNetCoreAppPackageName, minorVersion);
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[ClassData(typeof(SupportedAspNetCoreAllVersions))]
|
||||
public void ItRollsForwardToTheLatestAspNetCoreAllVersion(string minorVersion)
|
||||
{
|
||||
ItRollsForwardToTheLatestVersion(TestProjectCreator.AspNetCoreAllPackageName, minorVersion);
|
||||
}
|
||||
|
||||
internal void ItRollsForwardToTheLatestVersion(string packageName, string minorVersion)
|
||||
{
|
||||
var testProjectCreator = new TestProjectCreator()
|
||||
{
|
||||
PackageName = packageName,
|
||||
MinorVersion = minorVersion,
|
||||
// Set RuntimeIdentifier to opt in to roll-forward behavior
|
||||
RuntimeIdentifier = Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
|
||||
};
|
||||
|
||||
var testInstance = testProjectCreator.Create();
|
||||
|
||||
string projectDirectory = testInstance.Root.FullName;
|
||||
|
||||
// Get the version rolled forward to
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
string assetsFilePath = Path.Combine(projectDirectory, "obj", "project.assets.json");
|
||||
var assetsFile = new LockFileFormat().Read(assetsFilePath);
|
||||
|
||||
var rolledForwardVersion = GetPackageVersion(assetsFile, packageName);
|
||||
rolledForwardVersion.Should().NotBeNull();
|
||||
|
||||
if (rolledForwardVersion.IsPrerelease)
|
||||
{
|
||||
// If this version of .NET Core is still prerelease, then:
|
||||
// - Floating the patch by adding ".*" to the major.minor version won't work, but
|
||||
// - There aren't any patches to roll-forward to, so we skip testing this until the version
|
||||
// leaves prerelease.
|
||||
return;
|
||||
}
|
||||
|
||||
testProjectCreator.Identifier = "floating";
|
||||
|
||||
var floatingProjectInstance = testProjectCreator.Create();
|
||||
|
||||
var floatingProjectPath = Path.Combine(floatingProjectInstance.Root.FullName, "TestAppSimple.csproj");
|
||||
|
||||
var floatingProject = XDocument.Load(floatingProjectPath);
|
||||
var ns = floatingProject.Root.Name.Namespace;
|
||||
|
||||
|
||||
if (packageName == TestProjectCreator.NETCorePackageName)
|
||||
{
|
||||
// Float the RuntimeFrameworkVersion to get the latest version of the runtime available from feeds
|
||||
floatingProject.Root.Element(ns + "PropertyGroup")
|
||||
.Add(new XElement(ns + "RuntimeFrameworkVersion", $"{minorVersion}.*"));
|
||||
}
|
||||
else
|
||||
{
|
||||
floatingProject.Root.Element(ns + "ItemGroup")
|
||||
.Element(ns + "PackageReference")
|
||||
.Add(new XAttribute("Version", $"{minorVersion}.*"),
|
||||
new XAttribute("AllowExplicitVersion", "true"));
|
||||
}
|
||||
|
||||
floatingProject.Save(floatingProjectPath);
|
||||
|
||||
new RestoreCommand()
|
||||
.WithWorkingDirectory(floatingProjectInstance.Root.FullName)
|
||||
.Execute()
|
||||
.Should().Pass();
|
||||
|
||||
string floatingAssetsFilePath = Path.Combine(floatingProjectInstance.Root.FullName, "obj", "project.assets.json");
|
||||
|
||||
var floatedAssetsFile = new LockFileFormat().Read(floatingAssetsFilePath);
|
||||
|
||||
var floatedVersion = GetPackageVersion(floatedAssetsFile, packageName);
|
||||
floatedVersion.Should().NotBeNull();
|
||||
|
||||
rolledForwardVersion.ToNormalizedString().Should().BeEquivalentTo(floatedVersion.ToNormalizedString(),
|
||||
$"the latest patch version for {packageName} {minorVersion} in Microsoft.NETCoreSdk.BundledVersions.props " +
|
||||
"needs to be updated (see the ImplicitPackageVariable items in MSBuildExtensions.targets in this repo)");
|
||||
}
|
||||
|
||||
private static NuGetVersion GetPackageVersion(LockFile lockFile, string packageName)
|
||||
{
|
||||
return lockFile?.Targets?.SingleOrDefault(t => t.RuntimeIdentifier != null)
|
||||
?.Libraries?.SingleOrDefault(l =>
|
||||
string.Compare(l.Name, packageName, StringComparison.CurrentCultureIgnoreCase) == 0)
|
||||
?.Version;
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WeCoverLatestNetCoreAppRollForward()
|
||||
{
|
||||
// Run "dotnet new console", get TargetFramework property, and make sure it's covered in SupportedNetCoreAppVersions
|
||||
var directory = TestAssets.CreateTestDirectory();
|
||||
string projectDirectory = directory.FullName;
|
||||
|
||||
new NewCommandShim()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("console --no-restore")
|
||||
.Should().Pass();
|
||||
|
||||
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
||||
|
||||
var project = XDocument.Load(projectPath);
|
||||
var ns = project.Root.Name.Namespace;
|
||||
|
||||
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
||||
.Element(ns + "TargetFramework")
|
||||
.Value;
|
||||
|
||||
SupportedNetCoreAppVersions.Versions.Select(v => $"netcoreapp{v}")
|
||||
.Should().Contain(targetFramework, $"the {nameof(SupportedNetCoreAppVersions)}.{nameof(SupportedNetCoreAppVersions.Versions)} property should include the default version " +
|
||||
"of .NET Core created by \"dotnet new\"");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WeCoverLatestAspNetCoreAppRollForward()
|
||||
{
|
||||
var directory = TestAssets.CreateTestDirectory();
|
||||
string projectDirectory = directory.FullName;
|
||||
|
||||
// Run "dotnet new web", get TargetFramework property, and make sure it's covered in SupportedAspNetCoreAppVersions
|
||||
|
||||
new NewCommandShim()
|
||||
.WithWorkingDirectory(projectDirectory)
|
||||
.Execute("web --no-restore")
|
||||
.Should().Pass();
|
||||
|
||||
string projectPath = Path.Combine(projectDirectory, Path.GetFileName(projectDirectory) + ".csproj");
|
||||
|
||||
var project = XDocument.Load(projectPath);
|
||||
var ns = project.Root.Name.Namespace;
|
||||
|
||||
string targetFramework = project.Root.Element(ns + "PropertyGroup")
|
||||
.Element(ns + "TargetFramework")
|
||||
.Value;
|
||||
|
||||
SupportedAspNetCoreVersions.Versions.Select(v => $"netcoreapp{v}")
|
||||
.Should().Contain(targetFramework, $"the {nameof(SupportedAspNetCoreVersions)} should include the default version " +
|
||||
"of Microsoft.AspNetCore.App used by the templates created by \"dotnet new web\"");
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -145,6 +145,21 @@
|
|||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Needs .NET Core 1.1"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Build.Tests.GivenThatWeWantToBuildANetCoreApp.It_runs_a_rid_specific_app_from_the_output_folder"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Needs .NET Core 2.1.15"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishASelfContainedApp.It_can_make_a_Windows_GUI_exe"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Needs .NET Core 2.1.15"/>
|
||||
|
||||
<Method Name="Microsoft.NET.Publish.Tests.GivenThatWeWantToPublishAFrameworkDependentApp.It_publishes_with_or_without_apphost"
|
||||
Skip="true"
|
||||
Issue=""
|
||||
Reason="Needs .NET Core 2.1.15 on Mac OS"/>
|
||||
|
||||
</SkippedTests>
|
||||
</Tests>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue