Skip to content

Disable NU5105 #9044

Closed
Closed

Description

@nkolev92

When creating semver2 packages...you get something like...

The package version '1.2.3+semver2.metadata' uses SemVer 2.0.0 or components of SemVer 1.0.0 that are not supported on legacy clients. Change the package version to a SemVer 1.0.0 string. If the version contains a release label it must start with a letter. This message can be ignored if the package is not intended for older clients.

I believe at this point this warning should be removed.

Semver 2.0 was backported to VS 2015, additionally both 4.x and 5.x latest version support semver2.0

Activity

  1. jwdonahue commented on Jan 13, 2020

    @jwdonahue

    Or at least tell us how to disable this incredibly annoying warning.

  2. nkolev92 commented on Jan 13, 2020

    @nkolev92
    MemberAuthor

    @jwdonahue

    Refer to: https://docs.microsoft.com/en-us/nuget/reference/errors-and-warnings

    If you are using msbuild /t:pack or dotnet.exe pack, refer to

    The errors and warnings listed here are available only with PackageReference-based projects and NuGet 4.3.0+. NuGet also honors MSBuild properties to suppress warnings or elevate them to errors. For more information, see How to: Suppress Compiler Warnings in the Visual Studio documentation.

    More specifically: https://docs.microsoft.com/en-us/visualstudio/ide/how-to-suppress-compiler-warnings?view=vs-2019

    For example, in the NuGet solution we do:

    https://github.com/NuGet/NuGet.Client/blob/f64621487c0b454eda4b98af853bf4a528bef72a/build/common.project.props#L47

    If you are using NuGet.exe, use:

    nuget.exe pack package.nuspec -Properties NoWarn=NU5105

  3. nkolev92 commented on Feb 5, 2020

    @nkolev92
    MemberAuthor

    Dup of #5201

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area:ErrorHandlingFunctionality:PackProduct:dotnet.exeType:Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions