Should SideBySide (ExcludeVersions) flag exist per package as attribute in packages.config?

Aug 10, 2011 at 1:25 AM

After having a look through the code, design and specs (specifically it seems that one simplification may be to push down the ExcludeVersion or SideBySide flag to a package level.

This would allow the default to be set per-solution or across the board (hopefully non-versioned directories under packages) with an exception placed within the packages.config where required.  This also allows mixed mode where required.

This also simplifies the existing pattern of DefaultPackagePathResolver, which needs to be instantiated differently wherever you need to run with the ExcludeVersion functionality.

This would look something like this (with the default being a missing attribute?):

<?xml version="1.0" encoding="utf-8"?>
  <package id="Castle.Core" version="2.5.6" SideBySide="true" />

Obviously there would be quite a few changes required to support this, but it may make NuGet quite a bit more flexible.

Aug 10, 2011 at 3:42 AM

Sounds like a logical approach to me.  I'd consider a package element in a package.config file as the equivalent to a Reference in the respective VS project file ItemGroup (MSBuild), and similar behaviour such as 'Copy Local' is baked in to those references (i.e. <Private>True</Private>).  The more I play, the more I want to write some MSBuild targets :-)

Apr 11, 2012 at 4:53 AM

I've been taking a look at how to incorporate the sidebyside flag into the global nuget.config settings via the vsix, and incorporating the flag on a package level seems quite logical.