vscode无法使用nuget的小问题

在使用vscode的过程使用NuGet Package Manager插件安装Package包的时候会出现 "Versioning information could not be retrieved from the NuGet package repository. " 的错误导致无法安装Package包,可以修改fetchPackageVersions.js解决问题。

问题:

“Versioning information could not be retrieved from the NuGet package repository. Please try again later.”

解决方式:

打开 /Users/用户名/.vscode/extensions/jmrog.vscode-nuget-package-manager-1.1.6/out/src/actions/add-methods/fetchPackageVersions.js 修改后的代码 加上 .toLowerCase()

1
...node_fetch_1.default(`${versionsUrl}${selectedPackageName.toLowerCase()}/index.json`, utils_1.getFetchOptions(vscode.workspace.getConfiguration('http')))