Open jamesmontemagno opened 8 years ago
:+1:
@yishaigalatzer not sure if client or server
The issue is that it is not known based on the nuspec only, to know 100% you need the whole package and to run the install script (in a packages.config scenario). Furthermore we can't put the knowledge in the server directly because it means new projects don't just work and people using privates servers have to upgrade frequently as well as server authors having to keep up.
We have ideas in this area to approximate based on package folders, and the server will need to send this information down.
We can keep this issue around to track the server side work.
We still got to figure out the client story.
It gets even more interesting when new versions packages drop older frameworks. For example webapi 2 dropped support for net40, so in theory webapi will still be applicable for a net40 project but only with 1.x versions. Solving this problem makes things more complicated on two levels
Could we at least list the platforms a package is made for, on the version you're looking at? e.g. "net40", "dotnet52". One of the frustrating pieces with using a package on multiple platforms is I have to download the package and unzip it to determine what it supports. I'd love to see something as simple as list of folders in /lib
on nuget.org.
Related is the annoyance of the .zip
download link not being a .zip, which makes the tooling another step. I'll search for issues on that in a moment and create if it doesn't exist.
We have a similar idea being discussed, it will require client changes as well.
When searching for a NuGet packages it would be ideal to have a way of filtering on the supported platforms.
Rationale
It is extremely difficult to know what packages out there are compatible with your project or with your PCL that you have created. You don't get an indication of error until after you try to install the package. NuGet already knows what the package supports via the nuspec and should allow filtering down to a specific target.
Single Project
For instance I am in a Xamarin.Android project, I would love it if by default it showed me everything, but I could filter down to packages that include Xamarin.Android as their target. This could be either a PCL or just a Xamarin.Android library.
PCL Project
For portable class libraries it would then narrow down to packages that target PCL that fit the supported profile of the PCL I currently and searching for.
Solution Level
When dealing with the solution level NuGet installation it is a bit trickier as it would be opt-in to filter down the packages. Ideally there is a drop down of what projects you want to install into (all by default) that you could narrow down, and then NuGet Gallery would narrow down what is visible based on what projects are selected and what is compatible to install in all.