Revert "Adding a work around for publishing self-contained apps to RIDs that are not available for Microsoft.NETCore.App 2.0.0."

This reverts commit 370243ab81.
This commit is contained in:
Tanner Gooding 2018-05-03 15:50:19 -07:00
parent a8856ddccc
commit 4c7d1df5b3

View file

@ -4,9 +4,7 @@
using System; using System;
using System.IO; using System.IO;
using System.Diagnostics; using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Xml.Linq;
using FluentAssertions; using FluentAssertions;
using Microsoft.DotNet.Cli.Utils; using Microsoft.DotNet.Cli.Utils;
using Microsoft.DotNet.PlatformAbstractions; using Microsoft.DotNet.PlatformAbstractions;
@ -105,19 +103,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var testInstance = TestAssets.Get(testAppName) var testInstance = TestAssets.Get(testAppName)
.CreateInstance() .CreateInstance()
.WithSourceFiles() .WithSourceFiles()
.WithProjectChanges(project => .WithRestoreFiles();
{
var ns = project.Root.Name.Namespace;
var propertyGroup = project.Root.Elements(ns + "PropertyGroup").First();
// This is needed to be able to restore for RIDs that were not available in Microsoft.NetCore.App 2.0.0.
// M.NC.App 2.0.0 depends on a version of Microsoft.NetCore.Platforms that lacks the mapping for the
// latest RIDs. Given that self-contained apps are pinned to 2.0.0 in this version of the SDK, we
// need a manual roll-forward.
propertyGroup.Add(
new XElement(ns + "RuntimeFrameworkVersion", "2.0.*"));
});
var testProjectDirectory = testInstance.Root; var testProjectDirectory = testInstance.Root;
@ -184,19 +170,7 @@ namespace Microsoft.DotNet.Cli.Publish.Tests
var testInstance = TestAssets.Get(testAppName) var testInstance = TestAssets.Get(testAppName)
.CreateInstance($"PublishesSelfContained{selfContained}") .CreateInstance($"PublishesSelfContained{selfContained}")
.WithSourceFiles() .WithSourceFiles()
.WithProjectChanges(project => .WithRestoreFiles();
{
var ns = project.Root.Name.Namespace;
var propertyGroup = project.Root.Elements(ns + "PropertyGroup").First();
// This is needed to be able to restore for RIDs that were not available in Microsoft.NetCore.App 2.0.0.
// M.NC.App 2.0.0 depends on a version of Microsoft.NetCore.Platforms that lacks the mapping for the
// latest RIDs. Given that self-contained apps are pinned to 2.0.0 in this version of the SDK, we
// need a manual roll-forward.
propertyGroup.Add(
new XElement(ns + "RuntimeFrameworkVersion", "2.0.*"));
});
var testProjectDirectory = testInstance.Root; var testProjectDirectory = testInstance.Root;