dotnet构建间歇性退出,出现分段错误(核心已转储)或Linux上的139

时间:2019-10-22 10:34:06

标签: c# linux asp.net-core .net-core

我正在使用dotnet core sdk 2.1.403并在Linux上构建项目。间歇性生成失败,出现分段错误或139

构建本身不会启动,一旦发出命令“ dotnet build”,它将以“分段错误(核心已转储)”或139出现。

我正在使用的平台是 红帽企业服务器7.3 Linux2x86_64

请有人可以对此提供一些见识。

项目文件的内容是

<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
    <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
    <OutputPath>$(BROOT)/bin</OutputPath>
    <AssemblyName>Simple</AssemblyName>
    <IntermediateOutputPath>$(OutputPath)</IntermediateOutputPath>
    <OutDir>$(OutputPath)</OutDir>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="x">
      <HintPath>$(BROOT)/bin/x.dll</HintPath>
    </Reference>
  </ItemGroup>

  <Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(OS)' == 'Windows_NT'">
   <Exec Command="rmdir /S /Q obj" />
  </Target>

  <Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(OS)' != 'Windows_NT'">
   <Exec Command="rm -r obj" />
  </Target>

</Project>

0 个答案:

没有答案