Pass any as rid (#8677)

This commit is contained in:
William Lee 2018-02-26 11:46:01 -08:00 committed by GitHub
parent 4f2e060ef3
commit c28f4a2e34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 28 deletions

View file

@ -14,6 +14,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool
{
internal class ProjectRestorer : IProjectRestorer
{
private const string AnyRid = "any";
private readonly IReporter _reporter;
public ProjectRestorer(IReporter reporter = null)
@ -46,7 +47,7 @@ namespace Microsoft.DotNet.Tools.Install.Tool
argsToPassToRestore.AddRange(new List<string>
{
"--runtime",
GetRuntimeIdentifierWithMacOsHighSierraFallback(),
AnyRid,
$"/p:BaseIntermediateOutputPath={assetJsonOutput.ToQuotedString()}"
});
@ -68,17 +69,5 @@ namespace Microsoft.DotNet.Tools.Install.Tool
throw new ToolPackageException(LocalizableStrings.ToolInstallationRestoreFailed);
}
}
// walk around for https://github.com/dotnet/corefx/issues/26488
// fallback osx.10.13 to osx
private static string GetRuntimeIdentifierWithMacOsHighSierraFallback()
{
if (RuntimeEnvironment.GetRuntimeIdentifier() == "osx.10.13-x64")
{
return "osx-x64";
}
return RuntimeEnvironment.GetRuntimeIdentifier();
}
}
}

View file

@ -53,16 +53,4 @@
<MSBuild BuildInParallel="False" Projects="SampleGlobalTool/consoledemo.csproj" Targets="pack" Properties="Configuration=Release;NuspecFile=includepublish.nuspec;NuspecBasePath=$(testAssetSourceRoot);PackageOutputPath=$(OutputPath)/TestAssetLocalNugetFeed">
</MSBuild>
</Target>
<Target Name="DownloadTestAssetPackages" BeforeTargets="Build">
<PropertyGroup>
<!-- use a prerelease version that supports alpine -->
<PlatformsNupkgFileName>microsoft.netcore.platforms.2.1.0-preview1-26115-04.nupkg</PlatformsNupkgFileName>
<PlatformsNupkgUri>https://dotnet.myget.org/F/dotnet-core/api/v2/package/Microsoft.NETCore.Platforms/2.1.0-preview1-26115-04</PlatformsNupkgUri>
</PropertyGroup>
<DownloadFile Uri="$(PlatformsNupkgUri)"
DestinationPath="$(OutputPath)/TestAssetLocalNugetFeed/$(PlatformsNupkgFileName)" />
</Target>
</Project>

View file

@ -8,9 +8,6 @@
<packageTypes>
<packageType name="DotnetTool" />
</packageTypes>
<dependencies>
<dependency id="Microsoft.NETCore.Platforms" version="2.1.0-preview1-26115-04" />
</dependencies>
</metadata>
<files>
<file src="bin\Release\netcoreapp2.1\publish\*.*" target="tools\netcoreapp2.1\any\" />