I’ve been involved in a project using Visual Studio 2012 that has multiple solutions and multiple projects. In most cases, one solution will have to refer to the library build in a different project. Since most projects have their own set of nuget repositories, we run into the issues of missing references even when we try to restore the packages from within VS.
Has anyone come across some best practices on that?
The system we are using are VS 2012 and our code is store in a GIT server.
7
The issue you are encountering is weird. You may check twice the way NuGet dependencies are stored in source control.
What may help is:
-
To use one solution instead of several ones. Unless there are multiple teams in different departments of your company working on completely independent projects with a dependency on a common project, one solution may make things much easier, especially when it comes to dependencies.
If you are afraid that Visual Studio will perform badly with a solution containing a few hundreds of projects, you may be interested by this answer.
-
To deploy each project in a form of a NuGet package and to let NuGet handle the dependencies. If you work on closed source software, you can set up your private NuGet server for that.
Agreeing on common versions of third-party NuGet libraries may make things easier as well. For instance, if a team is upgrading to a new version of Entity Framework, another team may do it at the same time to avoid potential issues with two versions being used side by side.
1