When referencing a package that contains a portable library, such as "portable-windows8+net45", and an ambiguous non-portable library, such as "net45", the user should be prompted as to which library they want to reference.
A related work item (https://nuget.codeplex.com/workitem/2790
) states that it should be up to the package developer to choose a preference, but that won't work in the following scenario because the correct choice is only known by the user, similarly to the discussion: https://nuget.codeplex.com/discussions/398564
- User adds a new portable class library project to their solution.
- User adds a reference to a NuGet package that contains a "portable-windows8+net45" library and a "net45" library. A reference to the portable library is added automatically by NuGet.
- User adds a WPF project to their solution.
- User adds a reference from their WPF project to their portable class library project.
User adds a reference in their WPF project to the previous NuGet package, only this time NuGet automatically chooses the "net45" library based on the rules defined in http://docs.nuget.org/docs/release-notes/nuget-2.1.
Given the choice, the package author is most likely going to give the "net45" library preference because it has a larger surface area, but clearly that's incorrect in this situation. The user needs to have the choice.