Nuget - Packages.Config use latest versions of packages

2

Scenery

I have a project where my Libraries (other components of the project) are Nuget packages, and whenever it has some update is generated in Proget a new version .. and all developers have to give an update packages manually so that TeamCity for example use the latest version specified in package.config.

The simplified example of my packages.config

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="BibliotecaX" version="2.0.1" targetFramework="net461" />
</packages>

I would like to do in a way where instead of specifying this version, use the version for example version="2.0.*" or version="2.*.*" so when VisualStudio is doing restore always pick the last version (specific packages only) where I would make this setting.

If anyone has any suggestions.

    
asked by anonymous 14.02.2018 / 13:35

1 answer

1

I have decided as follows: Converted packages.config to packagereferences

I used this extension to help me with migration:

link

  <ItemGroup>
    <PackageReference Include="Castle.Core" Version="4.2.*" />
    <PackageReference Include="Newtonsoft.Json" Version="10.0.*" />
    <PackageReference Include="NSubstitute" Version="3.1.*" />
   </ItemGroup>

Solved, in the build it downloads the latest version according to my condition (1.0. *)

    
15.02.2018 / 11:52