2017-02-20 16:01:29 +00:00
|
|
|
// Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Test.Utilities
|
|
|
|
{
|
|
|
|
public static class EnvironmentInfo
|
|
|
|
{
|
|
|
|
public static bool HasSharedFramework(string framework)
|
|
|
|
{
|
2017-03-20 16:32:49 +00:00
|
|
|
string rid = RepoDirectoriesProvider.BuildRid;
|
|
|
|
|
2017-02-20 16:01:29 +00:00
|
|
|
if (framework == "netcoreapp1.0")
|
|
|
|
{
|
|
|
|
switch (rid)
|
|
|
|
{
|
|
|
|
case "fedora.24-x64":
|
2017-09-21 15:20:55 +00:00
|
|
|
case "rhel.6-x64":
|
2017-02-20 16:01:29 +00:00
|
|
|
case "opensuse.42.1-x64":
|
|
|
|
case "ubuntu.16.10-x64":
|
2017-03-20 16:32:49 +00:00
|
|
|
case "linux-x64":
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (framework == "netcoreapp1.1")
|
|
|
|
{
|
|
|
|
switch (rid)
|
|
|
|
{
|
|
|
|
case "linux-x64":
|
2017-09-21 15:20:55 +00:00
|
|
|
case "rhel.6-x64":
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (framework == "netcoreapp2.0")
|
|
|
|
{
|
|
|
|
switch (rid)
|
|
|
|
{
|
|
|
|
case "rhel.6-x64":
|
2017-02-20 16:01:29 +00:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2017-09-21 15:20:55 +00:00
|
|
|
}
|