Description
I and my team have been testing and evaluating vNext for awhile now and one issue keeps coming back to bite us over and over again: NuGet Package Sources and Target KRE.
Our Visual Studio 2015 environments now have four distinct NuGet package sources and we switch what source we need based on the project or solution we have open. Do I need nightly builds, or do I need beta1, perhaps beta 2, bleeding beta 4, nuget.org or myget.org. Consider I might have two instances of Visual Studio 2015 open at the same time and I need one package source for one and different one for the other.
Side Note: There are a few blogs that say never ever enable more than a single NuGet source at a time and almost all of the samples show multiple NuGet sources selected. A single NuGet source at a time seems to help a lot!
Would there not be an advantage to being able to specify the NuGet source and target KRE in the project.json?
Example: You might have a theoretical MusicStore solution distribution on GitHub and one project requires the production NuGet source and another project demonstrating new libraries requires a different beta package source. There is no standard place to specify the required package source for the users of the distribution.
It would seem to be a big time saver for people who will in the future regularly bounce between production release NuGet sources and nightly build NuGet sources. I acknowledge that NuGet.config can help but that isn't the whole story (thank you @Eilon for that solution).
Here is the thing... If the packages are incompatible with the selected KRE the IDE does not handle the incompatibility well i.e. the developer has very few (almost none) clues as to why Roselyn is unhappy with references. Packages are specified in the project.json, Nuget source in NuGet.config, and the target KRE is specified in the project properties. There seems to be a disconnect between the very interdependent configuration settings and if set wrong the behavior is undesirable.