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:
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.
You could try reinstalling all the NuGet packages. You can do this in the Package Manager Console window:
Update-Package -reinstall -ignoredependencies
I would make sure you have a backup of the source code or have the code in source control before running this command.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With