Over Macho Grande

Sunday, August 31, 2014

MSBuild, NuGet restore, and HintPath

First of, let me start by acknowledging that you're no longer supposed to use NuGet restore (with the .nuget) as of NuGet 2.7.  Then again, to quote Mick Jagger, you can't always get what you want.

The biggest problem I have with this is the "HintPath" in the project file.  It took some experimentation (and a couple of wrong turns) to work out that HintPath is relative to the project directory even when it's part of a multi-project solution.

You'll know that your HintPath is wrong when the NuGet package is installed but can't be found by the compiler.  Drop into the directory containing your project and confirm that you've got a valid HintPath.  One of my wrong turns was not verifying that I had a correct path (there was an extra 'lib' in the definition.

You may also see this as a busted reference in Visual Studio.


0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home