[英]How to get rid of this problem ( On adding a nuget packages from VSCode it says terminated with exit code: 1.)?
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.终端将被任务重用,按任意键关闭它。
Note: I'm using Ubuntu.注意:我使用的是 Ubuntu。
We may solve this issue by one of following process.我们可以通过以下过程之一解决此问题。
It may cause, our file or folder is corrupted.
这可能会导致我们的文件或文件夹已损坏。
It may cause not to be installed correctly.
可能会导致安装不正确。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.