title: What is the most standard way to get the latest version of an assembly solution-wide using NuGet?
body: <p>My company is moving to using NuGet for our internal dependencies for desktop applications. This works fine for versioned imports, but in some cases (like during pre-Beta on a product) we'd like to grab the latest version of the dependency on our build servers and have the csproj files find it without issue.</p>
  
  <p>We'd like to use automatic package restore, but that seems to be constrained by a specific version (as noted in <a href="https://stackoverflow.com/questions/11630414/nugets-restore-package-insists-on-specific-package-versions">this question</a>). Using nuget restore followed by nuget update is also a possibility, but it doesn't seem to work solution-wide the way that restore does (and we have a couple dozen projects that have to share the same version of the same dependency).</p>
  
  <p>Our best solution so far has been to add a hint path to the dependency binary in a non-versioned manner, i.e.,</p>
  
  <pre><code>&lt;Reference Include="Dependency"&gt;
    &lt;SpecificVersion&gt;False&lt;/SpecificVersion&gt;
    &lt;HintPath&gt;..\..\packages\Dependency\lib\net40\Dependency.dll&lt;/HintPath&gt;
  &lt;/Reference&gt;
  </code></pre>
  
  <p>And use the pre-build event to run </p>
  
  <pre><code>nuget.exe install Dependency -NoCache -ExcludeVersion
  </code></pre>
  
  <p>Is there a better way to do this? It would be nice to do it the most standard way possible so that we can get tooling support and new developers to the project can more easily know how to add their own dependencies via NuGet.</p>