首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在.net CentOS/Redhat上恢复时,Linux5Dotnet构建挂起

在.net CentOS/Redhat上恢复时,Linux5Dotnet构建挂起
EN

Stack Overflow用户
提问于 2021-03-11 09:37:41
回答 1查看 338关注 0票数 0

在计算机上安装.net 5SDK后,dotnet build在恢复时挂起。当我取消它时,会显示以下内容:

代码语言:javascript
复制
MSBUILD : error MSB4166: Child node "3" exited prematurely. Shutting down. Diagnostic information may be found in files in "/tmp/" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
MSBUILD : error MSB4166: Child node "4" exited prematurely. Shutting down. Diagnostic information may be found in files in "/tmp/" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
MSBUILD : error MSB4166: Child node "2" exited prematurely. Shutting down. Diagnostic information may be found in files in "/tmp/" and will be named MSBuild_*.failure.txt. This location can be changed by setting the MSBUILDDEBUGPATH environment variable to a different directory.
/usr/share/dotnet/sdk/5.0.201/NuGet.targets(131,5): error : Restore canceled! [/srv/project/project.csproj]

~/.nuget/NuGet/NuGet.Config中将nuget配置设置为使用代理

代码语言:javascript
复制
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<config>
  <add key="dependencyVersion" value="Highest" />
  <add key="http_proxy" value="http://proxy.url.com:8080" />
</config>
  <packageSources>
    <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
  </packageSources>
</configuration>

我不确定发生了什么变化,据我所知,代理url没有任何变化。这在以前的.net核心3.1中有效,但在安装新的SDK时不再有效。

有没有什么变化是我需要解决的?我在.net 5的更改日志中没有看到任何关于这方面的内容。至少在我搜索nuget的时候是这样的。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-04-24 04:38:42

我不得不完全重新安装.net5。之前的安装在还原时挂起,因为它位于代理之后。由于某些原因,新的sdk不承认代理设置,或者安装在该过程中的某个位置挂起。

这是一个redhat发行版,所以yum list installed | grep "dotnet"用它删除了所有东西。我删除了.nuget包,并使用微软提供的dotnet-install.sh进行了手动安装:./dotnet-install.sh -c 5.0。我不得不经历更多的麻烦,因为这是一个手动安装,它默认的安装目录为~/.dotnet,但在获得路径中的可执行文件,并在服务中分配正确的环境变量后,我能够将其重新编译到服务器上并运行。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66575308

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档