I can't really follow the code that allows a project to expose its own custom INuGetPackageManager, with the goal of extending the way packages are installed on it. This is (if I got it correctly) implemented in the
ToNuGetProjectSystem extension method
in line 564 (in the dev-3.0.0 branch, but damn codepex can't give me a URL to the branch?!, when are you guys moving to GitHub, for love' sake? ;)).
It looks like there's too much magic and coupling there between what's returned by the project context and NuGet! Not only does the context need to return an INuGetPackageManager, it also has to be an instance with a property named Value that returns INuGetPackageManager
itself, invoked via reflection? What's the reason for that?
At a minimum, if that's "required" for whatever internal design reason, at least if the property doesn't exist, it should be possible for the project system to just implement INuGetPackageManager and have that "just work" as a "fallback"
to the current code.