How can we improve Visual Studio Team Services (VSTS)?

Support Semver 2.0 packages in VSTS Package Management

Nuget >4.3.0 now supports Semver 2.0 versioning for packages. VSTS package management should also. Semver 2.0 support makes life A LOT easier and ensures that we can make builds and packages with matching versions.

37 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Chris Johnson shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Erik commented  ·   ·  Flag as inappropriate

        I am getting the following error after upgrading to NET2.1:

        error : Failed to download package 'NuGet.Frameworks.4.7.0' from 'https://----.pkgs.visualstudio.com/_packaging/----/nuget/v3/flat2/nuget.frameworks/4.7.0/nuget.frameworks.4.7.0.nupkg'.
        error : Response status code does not indicate success: 400 (Bad Request - The package is invalid: The package version had build metadata. We do not support versions with build metadata
        error : The feed '[https://----.pkgs.visualstudio.com/_packaging/----/nuget/v3/index.json]'; lists package 'NuGet.Frameworks.4.7.0' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again.
        error : Unable to find package 'NuGet.Frameworks.4.7.0'.

        It looks like the package update that doesn't work is: Microsoft.Applicat Installing Microsoft.ApplicationInsights.AspNetCore 2.3.0.

        NuGet.Protocol.Core.Types.FatalProtocolException: The feed '[https://----.pkgs.visualstudio.com/_packaging/----/nuget/v3/index.json]'; lists package 'NuGet.Frameworks.4.7.0' but multiple attempts to download the nupkg have failed. The feed is either invalid or required packages were removed while the current operation was in progress. Verify the package exists on the feed and try again. ---> NuGet.Protocol.PackageNotFoundProtocolException: Unable to find package 'NuGet.Frameworks.4.7.0'.
        at NuGet.Protocol.FindPackagesByIdNupkgDownloader.GetNuspecReaderFromNupkgAsync(PackageIdentity identity, String url, SourceCacheContext cacheContext, ILogger logger, CancellationToken token)
        at NuGet.Protocol.HttpFileSystemBasedFindPackageByIdResource.GetDependencyInfoAsync(String id, NuGetVersion version, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
        at NuGet.Commands.SourceRepositoryDependencyProvider.GetDependenciesCoreAsync(LibraryIdentity match, NuGetFramework targetFramework, SourceCacheContext cacheContext, ILogger logger, CancellationToken cancellationToken)
        at NuGet.Commands.SourceRepositoryDependencyProvider.<>c__DisplayClass20_0.<<GetDependenciesAsync>b__0>d.MoveNext()

        Locally it works without a problem (VS 2017 15.7.5). We are using VSTS Package manager for shared packages internally between different solutions (apps). I would expect other people will run into this problem soon, seeing Microsoft.ApplicationInsights.AspNetCore 2.3.0 is an often used nuget package.

        Is there a way to work around this?

      • Wilbert van Dolleweerd commented  ·   ·  Flag as inappropriate

        Seconded. SemVer 2.0 specifically allows the following:

        "
        Build metadata MAY be denoted by appending a plus sign and a series of dot separated identifiers immediately following the patch or pre-release version. Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-]. Identifiers MUST NOT be empty. Build metadata SHOULD be ignored when determining version precedence. Thus two versions that differ only in the build metadata, have the same precedence. Examples: 1.0.0-alpha+001, 1.0.0+20130313144700, 1.0.0-beta+exp.sha.5114f85.
        "

        I have a build process that injects AssemblyInformationalVersion in all AssemblyInfo.cs files with the following information:

        AssemblyInformationalVersion="$(Major).$(Minor).$(Revision)+Build$(Build)SHA$(GitHash)"

        (Where GitHash is the SHA for the Git Commit). This is allowed by SemVer 2.0 specifications but fails on NuGet push with the following error:

        Microsoft.VisualStudio.Services.NuGet.WebApi.Exceptions.InvalidPackageException: The package is invalid: The package version had build metadata. We do not support versions with build metadata

      Feedback and Knowledge Base