Nathan
Nathan

Reputation: 6531

Why don't my nuget versions match

I get this warning building my asp.net core project on teamcity, and also appears as a warning in visual studios:

Dependency specified was Foo.Client >= 1.0.0-* but ended up with Foo.Client 1.0.25523.

I don't understand why this doesn't match. I can't seem to find any documentation on how to make these wildcard strings.

1.0.25523 is a copy a replace operation I do on my build server to reflect the build number. It's not something I'd like to directly reference, I'm just confused as to why my 1.0.0-* isn't accepting something that looks just to differ by patch version.

My package config looks something like this:

{
    "version": "1.0.0-*",
  "dependencies": {
    "Foo.Bar.Client": "1.0.0-*",
  },
    "frameworks": {
            "net46": {
                "dependencies": {
                                    "Foo": {
                                        "target": "project"
                                    }
                },
                "frameworkAssemblies": {
                }
            }
    }
}

And then the substitution is made here and in the Foo.Bar.Client project.json to change "version": "1.0.0-*" to "version": "1.0.25523"

Upvotes: 0

Views: 79

Answers (1)

Kevin C
Kevin C

Reputation: 344

There should be a *.nuspec file for your project, which will have the information about which package version you're using. From your error message, it seems that the package version in this file is 1.0.0 whereas you'll want to change this to 1.0.25523 I think.

You can also check here for some more information.

Upvotes: 1

Related Questions