Skip to content

Commit

Permalink
ported PR from NuGetArchive/NuGet3#130
Browse files Browse the repository at this point in the history
  • Loading branch information
zhili1208 committed Oct 13, 2015
1 parent 4042271 commit 19de485
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/NuGet.Core/NuGet.Frameworks/DefaultFrameworkMappings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public IEnumerable<KeyValuePair<string, string>> IdentifierShortNames
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStation4, "xamarinpsfour"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStationVita, "xamarinpsvita"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinWatchOS, "xamarinwatchos"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinTVOS, "xamarintvos"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinXbox360, "xamarinxboxthreesixty"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinXboxOne, "xamarinxboxone"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.Dnx, "dnx"),
Expand Down Expand Up @@ -380,6 +381,7 @@ public IEnumerable<OneWayCompatibilityMappingEntry> CompatibilityMappings
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStation4),
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStationVita),
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinWatchOS),
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinTVOS),
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinXbox360),
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinXboxOne),
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,9 @@ public IEnumerable<KeyValuePair<int, NuGetFramework[]>> ProfileOptionalFramework
var monoandroid = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.MonoAndroid, new Version(0, 0));
var monotouch = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.MonoTouch, new Version(0, 0));
var xamarinIOs = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinIOs, new Version(0, 0));
var xamarinTVOS = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinTVOS, new Version(0, 0));
var xamarinWatchOS = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinWatchOS, new Version(0, 0));
var monoFrameworks = new NuGetFramework[] { monoandroid, monotouch, xamarinIOs, xamarinWatchOS };
var monoFrameworks = new NuGetFramework[] { monoandroid, monotouch, xamarinIOs, xamarinWatchOS, xamarinTVOS };

profileOptionalFrameworks = new List<KeyValuePair<int, NuGetFramework[]>>();

Expand Down
1 change: 1 addition & 0 deletions src/NuGet.Core/NuGet.Frameworks/FrameworkConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public static class FrameworkIdentifiers
public const string XamarinPlayStation4 = "Xamarin.PlayStation4";
public const string XamarinPlayStationVita = "Xamarin.PlayStationVita";
public const string XamarinWatchOS = "Xamarin.WatchOS";
public const string XamarinTVOS = "Xamarin.TVOS";
public const string XamarinXbox360 = "Xamarin.Xbox360";
public const string XamarinXboxOne = "Xamarin.XboxOne";
public const string UAP = "UAP";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ public void Compatibility_ProjectCannotInstallDotNetLibraries(string framework)
[InlineData("xamarinpsthree")]
[InlineData("xamarinpsfour")]
[InlineData("xamarinpsvita")]
[InlineData("xamarintvos")]
[InlineData("xamarinxboxthreesixty")]
[InlineData("xamarinwatchos")]
[InlineData("xamarinxboxone")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public class NuGetFrameworkTests
[InlineData("Agnostic", "agnostic")]
[InlineData("portable-win8+net45+monoandroid+monotouch+xamarin.ios+xamarin.watchos", "portable-net45+win8")]
[InlineData("portable-monoandroid+xamarin.ios+xamarin.watchos+monotouch+win8+net45", "portable-net45+win8")]
[InlineData("portable-win8+net45+monoandroid+monotouch+xamarin.ios+xamarin.tvos", "portable-net45+win8")]
[InlineData("portable-monoandroid+xamarin.ios+xamarin.tvos+monotouch+win8+net45", "portable-net45+win8")]
public void NuGetFramework_ShortName(string input, string expected)
{
var fw = NuGetFramework.Parse(input);
Expand All @@ -54,6 +56,8 @@ public void NuGetFramework_ShortName(string input, string expected)
[InlineData("Agnostic", "agnostic")]
[InlineData("portable-net45+win8", "portable-net45+win8+monoandroid+monotouch+xamarin.ios+xamarin.watchos")]
[InlineData("portable-net45+win8", "portable-net45+win8+xamarin.ios+xamarin.watchos")]
[InlineData("portable-net45+win8", "portable-net45+win8+monoandroid+monotouch+xamarin.ios+xamarin.tvos")]
[InlineData("portable-net45+win8", "portable-net45+win8+xamarin.ios+xamarin.tvos")]
public void NuGetFramework_Equality(string a, string b)
{
var fw1 = NuGetFramework.Parse(a);
Expand Down

0 comments on commit 19de485

Please sign in to comment.