I have a Visual Studio 2012 solution with several projects. All the projects are unable to build because the location NuGet is restoring packages to is different than what is indicated by all the hintPath tags inside the various VS projects.
How do I cause all the hintpaths in all projects throughout the solution to be reset or deleted - so that the proper location of the dependencies can be established?
Ok, how I got myself into this mess is as follows:
- Create a nuget.config file in the directory above the VS solution. The nuget.config points to repository folder "Alpha".
- Add projects to the VS solution, and add NuGet package references throughout.
- Build, everything works.
- Close Visual Studio and edit the nuget.config file (from step 1) so that it now points to the "Bravo" repository folder
- Open Visual Studio and reload the VS solution.
- If package manager says that packages are missing, allow it to download the missing packages.
- Attempt to build - countless errors emerge saying that I may have forgotten to declare namespaces.
All the packages are downloaded successfully, and placed into the new repository location, but the VS projects still have hintpaths that point to the old location. Even worse, Visual Studio is unable to recognize that the referenced assemblies are no longer there. Instead of showing a yellow warning by each missing reference in the solution explorer, it acts as if they are found.
Changing the NuGet repository path should not leave the solution crippled and practically unfixable. Requiring a developer to regex search/replace hundreds of hintpaths manually through each project is gauche.