NuGet with shared Projects in different solutions

Topics: General
Jul 26, 2012 at 7:57 PM

We have a Util dll project we use in all our Solutions.  It seems if someone tries to add a new nuget package to this util from a solution, it messes up the csproj file for the Util.dll.

Nuget sticks in the .config file location from the Solution where the nuGet package was added.

This messes up all the other solutions as they cannot get the package or add the package.


Jul 31, 2012 at 6:57 AM

How would you propose the solution for your issue?

Jul 31, 2012 at 2:32 PM

Not sure.  Would be nice if their was some sort of documentation or instructions on how to use NuGet especially with TFS or more than one developer.  Especially in regards to sharing project in differnt solutions.  I really don't know what nuGet does with all the directories and config files it creates or how it uses them.  Every time I look I see some nuget file, directory or csproj entry and have no idea what it does.  Also see an option Enable nuGet Package Restore.  Some of the developers think enabling this option might help.  It's not clear what this option really does or how it does whatever it does.

Maybe if all projects had a config file that stated what nuget packages and versions are required.

Then on project startup it would look at what the current active solution file is.  If the packages were not installed in the solution file it would update the solution nuget config file.  So essentially don't put solution information in project files as projects may be shared between solutions.  Projects write/read to solutions.  Solutions do not write to project configs.