问题描述
我今天安装了 VS 2019,删除了所有其他版本的 VS(克服了空间紧缩问题).我正在尝试使用 nuget 包管理器,但一直低于异常.没有任何负载.我尝试从控制台安装软件包,但最终出现与下面相同的错误.任何帮助将不胜感激.
I have installed VS 2019 today removing all other versions of VS (over come space crunch). Am trying to use nuget package manager but keep getting below exception. Nothing loads. I tried to install packages from console and ended up with same error as below.Any help would be appreciated.
PM> 安装包 Microsoft.Azure.Devices -Version 1.21.0安装包:'' 不是有效的版本字符串.在行:1 字符:1+ 安装包 Microsoft.Azure.Devices -Version 1.21.0+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception+ FullQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
PM> Install-Package Microsoft.Azure.Devices -Version 1.21.0Install-Package : '' is not a valid version string.At line:1 char:1+ Install-Package Microsoft.Azure.Devices -Version 1.21.0+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Install-Package], Exception + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
已用时间:00:00:00.6338016
Time Elapsed: 00:00:00.6338016
推荐答案
我尝试了上述解决方案(删除所有已安装的 Nuget 包、.vm 文件夹等),但对我不起作用.我使用的是 Visual Studio 2019 v 16.8.4.更新到版本 16.8.5 为我解决了这个问题.
I tried the solution above (deleting all the installed Nuget packages, .vm folder, etc) but it didn't work for me. I was on Visual Studio 2019 v 16.8.4. Updating to Version 16.8.5 solved this issue for me.
这篇关于'' 不是有效的版本字符串."VS2019 nuget 中的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!