简体   繁体   English

如何摆脱这个问题(在从 VSCode 添加 nuget 包时,它说以退出代码终止:1。)?

[英]How to get rid of this problem ( On adding a nuget packages from VSCode it says terminated with exit code: 1.)?

When I trying to add Nuget Packages by Nuget gallery extension from VS Code.当我尝试通过VS Code 中Nuget 库扩展添加Nuget 包时。 It doesn't install the NuGet package.它不安装NuGet package。

Executing task: dotnet add /home/[user]/Public/Projects/yogihosting.com/Identity/Identity/Identity.csproj package Microsoft.AspNetCore.Identity.EntityFrameworkCore -v 5.0.6 -s https://api.nuget.org/v3/index.json < Executing task: dotnet add /home/[user]/Public/Projects/yogihosting.com/Identity/Identity/Identity.csproj package Microsoft.AspNetCore.Identity.EntityFrameworkCore -v 5.0.6 -s https://api.nuget. org/v3/index.json <

Determining projects to restore... Writing /tmp/tmpIIHQRz.tmp info: Adding PackageReference for package 'Microsoft.AspNetCore.Identity.EntityFrameworkCore' into project '/home/[user]/Public/Projects/yogihosting.com/Identity/Identity/Identity.csproj'.确定要恢复的项目...写入 /tmp/tmpIIHQRz.tmp 信息:将 package 'Microsoft.AspNetCore.Identity.EntityFrameworkCore' 的 PackageReference 添加到项目 '/home/[user]/Public/Projects/yogihosting.com/Identity/Identity /Identity.csproj'。 info: Restoring packages for /home/[user]/Public/Projects/yogihosting.com/Identity/Identity/Identity.csproj... error: Unable to load the service index for source https://api.nuget.org/v3/index.json .信息:正在为/home/[user]/Public/Projects/yogihosting.com/Identity/Identity/Identity.csproj恢复包... v3/index.json error: The SSL connection could not be established, see inner exception.错误:无法建立 SSL 连接,请参阅内部异常。 error: The remote certificate is invalid because of errors in the certificate chain: UntrustedRoot错误:由于证书链中的错误,远程证书无效:UntrustedRoot

Usage: NuGet.CommandLine.XPlat.dll package add [options]用法:NuGet.CommandLine.XPlat.dll package 添加[选项]

Options: -h|--help Show help information --force-english-output Forces the application to run using an invariant, English-based culture.选项: -h|--help 显示帮助信息 --force-english-output 强制应用程序使用不变的、基于英语的文化运行。 --package Id of the package to be added. --要添加的package的包ID。 --version Version of the package to be added. --version 要添加的 package 版本。 -d|--dg-file Path to the dependency graph file to be used to restore preview and compatibility check. -d|--dg-file 用于恢复预览和兼容性检查的依赖关系图文件的路径。 -p|--project Path to the project file. -p|--project 项目文件的路径。 -f|--framework Frameworks for which the package reference should be added. -f|--framework 应为其添加 package 参考的框架。 -n|--no-restore Do not perform restore preview and compatibility check. -n|--no-restore 不执行恢复预览和兼容性检查。 The added package reference will be unconditional.添加的 package 参考将是无条件的。 -s|--source Specifies NuGet package sources to use during the restore. -s|--source 指定要在还原期间使用的 NuGet package 源。 --package-directory Directory to restore packages in. --interactive Allow the command to block and require manual action for operations like authentication. --package-directory 恢复包的目录。 --interactive 允许命令阻止并要求手动操作进行身份验证等操作。 --prerelease Allows prerelease packages to be installed. --prerelease 允许安装预发布包。 The terminal process "/bin/bash '-c', 'dotnet add /home/[user]/Public/Projects/yogihosting.com/Identity/Identity/Identity.csproj package Microsoft.AspNetCore.Identity.EntityFrameworkCore -v 5.0.6 -s https://api.nuget.org/v3/index.json'" terminated with exit code: 1.终端进程“/bin/bash '-c', 'dotnet add /home/[user]/Public/Projects/yogihosting.com/Identity/Identity/Identity.csproj package Microsoft.AspNetCore.Identity.EntityFrameworkCore -v 5.0. 6 -s https://api.nuget.org/v3/index.json'"以退出代码终止:1。

Terminal will be reused by tasks, press any key to close it.终端将被任务重用,按任意键关闭它。

How can I get rid of this problem?我怎样才能摆脱这个问题?

https://api.nuget.org/v3/index.json shows:# https://api.nuget.org/v3/index.json显示:#

在此处输入图像描述

Note: I'm using Ubuntu.注意:我使用的是 Ubuntu。

We may solve this issue by one of following process.我们可以通过以下过程之一解决此问题。

  • copy project to another folder or create new project to another destination .项目复制到另一个文件夹创建新项目另一个目的地

It may cause, our file or folder is corrupted.这可能会导致我们的文件或文件夹已损坏。

  • Reinstalling our software(s) like IDE or dotnet or both .重新安装我们的软件,例如IDEdotnet两者

It may cause not to be installed correctly.可能会导致安装不正确。

  • The final is so funny.决赛太搞笑了Re-install your OS and then other softwares .重新安装您的操作系统,然后再安装其他软件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 尝试使用VS代码调试C#程序时,提示“prelaunchtask 'build'已终止,退出代码为1”,如何解决? - when trying to debugging an C# program by using VS code,says“prelaunchtask 'build'has been terminated, exit code is 1”,how to solve it? 将 Nuget 包从一个项目添加到另一个项目 - Adding Nuget Packages From One Project To Another 我该如何解决 NuGet 包的这个问题? - How can I solve this problem of NuGet packages? 如何在 VSCode 中为 nuget 包配置本地提要? - How can I configure a local feed for nuget packages in VSCode? Visual Studio编译错误-计算机中缺少nuget软件包,但是nuget restore表示已安装所有软件包? - Visual Studio compile error - nuget package missing from computer, but nuget restore says all packages installed? 如何查找代码中引用但项目中未引用的 NuGet 包 - How to find NuGet packages referenced in code but not in project 为WebAPI项目添加nuget包 - Adding nuget packages for a webapi project 如何使用Nuget.VisualStudio从存储库中获取软件包列表 - Using Nuget.VisualStudio how would I get a list of packages from a repository 如何让 NuGet 包为从另一个解决方案添加的现有项目正确恢复? - How to get NuGet packages to restore correctly for an existing project added from another solution? 如何引用 NuGet 包? - How to reference NuGet packages?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM