.net.net-corenugetvisual-studio-2019manage-nuget-packages

Why is the 'Version' column in Visual Studio NugetPackageManager showing blank for .NET Framework projects?


See pre-cursor question... What is the significance of the 'Version' column in Visual Studio NugetPackageManager interface? (as distinct from the 'Installed' column)


enter image description here

Having established that the Version column is intended to indicate "what version would be installed by clicking the install button now" ...

I'm testing .NET version compatibility of a Nuget Package that I'm publishing. When I attempt to install it in't .NET Framework project, the 'Installed' column is populated, but the 'Version' column isn't.

I'm hoping this is just some artifact of Nuget having evolved along with the move from .NET Framework to .NET Core/Standard?


Solution

  • After some tests, looks like the Version column is controlled by the PackageReference which is, of course, used in new sdk project.

    I tried to migrate a project(.NET Framework) from packages.config to PackageReference and I saw that the Version column listed the version number this time.

    So I think, if NuGet package manager can’t get/find the settings of PackageReference(should be in project file), then the corresponding Version column will be blank.

    Even for a .NET Standard project, for example if you create a .NET Standard class library project, you can see that it includes NETStandard.Library package but at Version column it is blank and in its project file, NETStandard.Library is not set explicit(it should be included in sdk).

    enter image description here