0

Is there any setting in VS2013 to allow all packages to be updated when the solution opens or builds?

I've seen the restore option which is supposed to work but I dont believe it updates with latest, even if it worked. https://docs.nuget.org/consume/package-restore

My requirement is that our users need not manually update all but that they must always get the latest.

learnerplates
  • 4,257
  • 5
  • 33
  • 42
  • Is this what you are looking for http://stackoverflow.com/questions/24765802/nuget-spec-dependencies-get-latest-version/26340666#26340666? – Joseph Devlin Apr 30 '15 at 09:33
  • looks like it. But it doesnt seem to work either. I've install JQuery 2.1.3. Then deleted the packages dir. then changed the packages.config to 2.1.2. And then rebuilt, I'd expect nuget to install 2.1.3 as its the latest version! but it does nothing. – learnerplates Apr 30 '15 at 10:22

2 Answers2

0

I've had a solution that is missing packages. Got them added manually though along with references from local server. Nuget site was down too, that might be an issue.

drblacko
  • 13
  • 1
  • 1
  • 4
0

I read somewhere that devs should us the "Allow Nuget to download missing packages" instead of the older Nuget.config solution. But doing this only updates missing packages it does not update with the latest automatically. it also adds this to the project file

<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('$(SolutionDir)\.nuget\NuGet.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\.nuget\NuGet.targets'))" />   </Target>
learnerplates
  • 4,257
  • 5
  • 33
  • 42