NuGet ignoring .NET version of project

Topics: General
Jul 23, 2014 at 3:57 PM
I'm wondering if I've discovered a bug or I'm not understanding how things should be working.

I have a solution with two unit test projects in it. One project is .NET 4.5 and the other is .NET 4.0. If I install the FluentAssertions project into the 4.5 project first then when I add it to the 4.0 project it picks the net45 assemblies from FluentAssertions to add as references. The opposite is also true, if I add FluentAssertions to the 4.0 project it picks the net40 of FA. When I later add FA to the 4.5 project it still picks the net40 FA assemblies.

It seem like NuGet should be looking at the version of the project into which the package is being installed and pick the right package assemblies that match the project settings.