0

I have created a package on Nuget.org.
However, when doing one of the first releases, I have used set an incorrect assembly version format - which is used as the package version.

Let's say that the version was 1.0.180305.0 (build date)
However, I do not want to use this format, I want a simpler thing with Major.Minor.BuildNumber format, i.e. 1.0.10, 1.0.11, 1.0.12 etc, where I increment Major and Minor manually and the Build number incremented automatically.

I have unlisted the 1.0.180305.0 version, so that it does not appear anywhere.

This works all OK, however when using Update-Package [PackageName] in Package Manager Console, it automatically gets the 1.0.180305.0 - even though its unlisted - because the version number is 'larger'.

How do I prevent this?

Bartosz
  • 4,406
  • 7
  • 41
  • 80

1 Answers1

1

nuget.org - how to prevent unlisted package from being downloaded when Update-Package is being used

This is a known issue about Package Manager Console in Visual Studio not filtering out unlisted packages on Update-Package commands.

The current workaround is using the command line: Uninstall-Package [-Id] and then Install-Package [-Id]

Issue 4553: https://github.com/NuGet/Home/issues/4553

Besides, this issue was fixed at Visual Studio 2017 15.6.0 preview3 (Current version is 15.7.3), I test it in my side with Visual Studio 2017 15.6.6, this issue no longer occurs. So you can also update Visual Studio to resolve this issue.

Hope this helps.

Leo Liu
  • 71,098
  • 10
  • 114
  • 135