Visual Studio NugetPackageManager 界面中“Version"列的意义是什么?(与“已安装"列不同) [英] What is the significance of the 'Version' column in Visual Studio NugetPackageManager interface? (as distinct from the 'Installed' column)

查看:31
本文介绍了Visual Studio NugetPackageManager 界面中“Version"列的意义是什么?(与“已安装"列不同)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已填充已安装"列,但未填充版本"列.

The 'Installed' column is populated, but the 'Version' column isn't.

版本"栏是什么意思?(与已安装"列不同)

What does the 'Version' column mean? (As distinct from the 'Installed' column)

(我熟悉语义版本的概念;所以我确切地知道版本号的概念对于 nuget 包意味着什么.我问的是什么那个 那个界面中的列的意思.)

(I'm familiar with the concept of Semantic Versions; so I know exactly what the concept of a version number means for a nuget package. I'm asking for exactly what does that column in that interface mean.)

关于空白的后续问题已经结束 这里.

推荐答案

Installed 应该很容易解释,当你选择一个特定的 NuGet 包时,这个 NuGet 包的版本会列在Installed 列,仅列出已安装/已安装的项目.所以如果一个项目没有安装这个 NuGet 包,那么它会显示为空白.

The Installed should be easy to explain, when you choose a specific NuGet package, the version of this NuGet package will be listed in the Installed column, and only listing for the project(s) which has/have it installed. So if one project doesn’t install this NuGet package, then it will show blank.

通常,Version 代表相同的东西(Installed).首先,Version栏应该只显示/列出安装在/用于.NET Standard、.NET Core或.NET项目的NuGet的版本号,对于.NET Framework项目它赢得不列出.此 Version 将匹配在项目的项目文件(.xxproj 文件)中设置的版本,即使 NuGet 包的特定版本(在 .xxproj 文件中设置)是未安装.但通常,它会列出与 Installed 列相同的版本号.

Normally, the Version represents the same thing(Installed). First of all, the Version column should only display/list version number of the NuGet which is installed in/for .NET Standard, .NET Core or .NET projects, and for .NET Framework project it won’t list. This Version will match the version that set in the project’s project file(.xxproj file), even if the specific version(set in .xxproj file) of the NuGet package is not installed. But normally, it lists the same version number with Installed column.

例如(在 .xxproj 文件中):

For example(in .xxproj file):

<ItemGroup>
    <PackageReference Include="LochNessBuilder" Version="3.0.0-alpha" />
</ItemGroup>

很明显,Version 列列出了您正在使用(想要使用)的 NuGet 包的版本号,Installed 列列出了您已安装(或准备使用,因为可能存在已安装的同一 NuGet 包的多个版本)的 NuGet 包.

So obviously, the Version column lists the version number of the NuGet packages which you are using(want to use), and the Installed column lists the version number of the NuGet packages which you have installed(or prepared to use, as maybe there exist multiple versions of the same NuGet package which were installed).

我认为这可以总结为:

  1. 如果你在项目中安装了具体版本的NuGet包,那么Installed栏中会列出版本号,如果没有则为空白,Installed 列更有可能表明您已安装此版本的 NuGet 包.

  1. If the specific version of NuGet package you have installed in the project, then the version number will be listed in Installed column, if not, it will be blank, and the Installed column is more likely to show that you have installed this version of NuGet package.

Version 列中列出的版本号与 .xxproj 文件中的 Version 属性设置匹配,并且更有可能显示您正在使用此版本的 NuGet 包.

The version number listed in Version column matches the Version property setting in .xxproj file, and is more likely to show that you are using this version of NuGet package.

这两列通常显示一个特定项目的相同版本号.

This two columns are usually show the same version number for one specific project.

基于.NET Framework 的项目不会在Version 列中列出版本号.它只会列出 .NET Core、.NET Standard 和 .NET 项目.原因应该是这些基于框架的项目/项目模板的结构不同,以及安装/复制/存储/使用NuGet包的机制不同.

.NET Framework based project will not list the version number in Version column. It will only list for .NET Core, .NET Standard and .NET project. The reason should be related to the different structures of these framework based project/project template, and the different mechanism of how to install/copy/store/use NuGet packages.

我相信这不是很重要,除非您看到一个项目的两列中的它们不同.

I believe this is not very important unless you see that they are different in two columns for one project.

这篇关于Visual Studio NugetPackageManager 界面中“Version"列的意义是什么?(与“已安装"列不同)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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