为什么 Visual Studio NugetPackageManager 中的“版本"列在 .NET Framework 项目中显示为空白? [英] Why is the 'Version' column in Visual Studio NugetPackageManager showing blank for .NET Framework projects?

查看:21
本文介绍了为什么 Visual Studio NugetPackageManager 中的“版本"列在 .NET Framework 项目中显示为空白?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅前导问题...

已确定版本"列旨在指示现在单击安装按钮将安装哪个版本";...

我正在测试我发布的 Nuget 包的 .NET 版本兼容性.当我尝试将其安装在非 .NET Framework 项目中时,会填充已安装"列,但不会填充版本"列.

  • 为什么?
  • 列中没有值是什么意思?
  • 我应该关心/担心吗?我做错了什么吗?

我希望这只是 Nuget 的一部分,随着从 .NET Framework 向 .NET Core/Standard 的转变而发展?

解决方案

经过一些测试,看起来 Version 列是由 PackageReference 控制的,当然,在

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


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.

  • Why?
  • What does the absence of a value in the column mean?
  • Should I care / be worried? Have I done something wrong?

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

解决方案

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).

这篇关于为什么 Visual Studio NugetPackageManager 中的“版本"列在 .NET Framework 项目中显示为空白?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆