Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ported PR from https://github.com/NuGet/NuGet3/pull/130 #22

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -78,6 +78,7 @@ public IEnumerable<KeyValuePair<string, string>> IdentifierShortNames
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStation3, "xamarinpsthree"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStation4, "xamarinpsfour"),
new KeyValuePair<string, string>(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStationVita, "xamarinpsvita"),
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 @@ -378,6 +379,7 @@ public IEnumerable<OneWayCompatibilityMappingEntry> CompatibilityMappings
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStation3),
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStation4),
CreateDotNetMappingForAllVersions(FrameworkConstants.FrameworkIdentifiers.XamarinPlayStationVita),
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,7 +123,8 @@ 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 monoFrameworks = new NuGetFramework[] { monoandroid, monotouch, xamarinIOs };
var xamarinTVOS = new NuGetFramework(FrameworkConstants.FrameworkIdentifiers.XamarinTVOS, new Version(0, 0));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we are removing this line?

var monoFrameworks = new NuGetFramework[] { monoandroid, monotouch, xamarinIOs, 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 @@ -55,6 +55,7 @@ public static class FrameworkIdentifiers
public const string XamarinPlayStation3 = "Xamarin.PlayStation3";
public const string XamarinPlayStation4 = "Xamarin.PlayStation4";
public const string XamarinPlayStationVita = "Xamarin.PlayStationVita";
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("xamarinxboxone")]
[InlineData("sl6")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class NuGetFrameworkTests
[InlineData("Any", "any")]
[InlineData("Unsupported", "unsupported")]
[InlineData("Agnostic", "agnostic")]
[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 @@ -50,6 +52,8 @@ public void NuGetFramework_ShortName(string input, string expected)
[InlineData("Any", "any")]
[InlineData("Unsupported", "unsupported")]
[InlineData("Agnostic", "agnostic")]
[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