JWP
JWP

Reputation: 6963

What happened to all my references?

Scenario: I have 14 projects (each in their own folder in TFS) with an additional folder named AllSolutions to contain all of them. Note not everyone on the team needs all 14 projects this is why I put the AllSolution.sln in its own folder.

The Allsolutions.sln was just upgraded to Nuget 2.0 and it compiles fine! So far so good.

Structure

I also have sub-solutions (that contain only those projects they need). These solutions are contained in the root folder shown below as ...Framework...

enter image description here

Problem

Any of the sub-solutions I load show this (whether they have one or more projects) all show missing assemblies:

Missing Assemblies

I suspect that my AllSolutions.sln gobbled them up. Perhaps I need to move all these solutions to the AllSolutions folder? BTW there is nothing that shows up in the output window when I open these sub-solutions.

If I open/edit any of the Proj files this is what I see.

Project File

Notice that the Nuget work put in hint paths at the AllSolutions folder.. Do I have to put in Hint paths for all of these and why?

Upvotes: 1

Views: 55

Answers (1)

Harikrishna Menon A
Harikrishna Menon A

Reputation: 455

In NuGet 2.0 or in the packages.config world, there is a package folder per solution. The issue you are seeing is due to this. NuGet 2.0 inserts a hint path during package install in the project file pointing to this location. You would need to resolve the relative location for this to work. You can also choose to use the repository path property in NuGet.config to provide a common location for the packages folder. This should solve your problem.

Instead of upgrading to NuGet 2.0, if you are using Visual Studio 2015 and above, I would recommend that you consider moving to project.json. In the porject.json world, you can have a global packages folder and your project file is not modified during package install. For more information on this, check out the wiki entry here

Upvotes: 1

Related Questions