Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

480
Views
La compilación del proyecto .NET Framework 4.8 en Docker falla con "Se alcanzó el final de la transmisión antes del final de la lectura"

Mi Dockerfile se ve así:

 FROM mcr.microsoft.com/dotnet/framework/sdk:4.8 AS build WORKDIR /projectName COPY . . RUN nuget restore COPY . . WORKDIR /repoName/projectName RUN msbuild ./projectName.csproj /p:Configuration=Debug

Localmente, el paso de msbuild no me da problemas. Sin un archivo .dockerignore, la compilación falla:

 Process is terminated due to StackOverflowException.

Cuando agrego un archivo .dockerignore que se parece a esto...

 ./.git ./.idea ./.vs ./gen ./packages ./irrelevantProject1 ./irrelevantProject2 # etc

... la compilación falla nuevamente, pero con un mensaje de error diferente:

 CompilerServer: server failed - server rejected the request 'Error reading response: Reached end of stream before end of read.' - b6c5574e-55ea-4d7d-adb3-e156ebd65296 C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error MSB6006: "csc.exe" exited with code -2146232797. [C:\repoName\projectName\projectName.csproj] Done Building Project "C:\repoName\projectName\projectName.csproj" (default targets) -- FAILED. Build FAILED. "C:\repoName\projectName\projectName.csproj" (default target) (1) -> (CoreCompile target) -> C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn\Microsoft.CSharp.Core.targets(71,5): error MSB6006: "csc.exe" exited with code -2146232797. [C:\repoName\projectName\projectName.csproj] 0 Warning(s) 1 Error(s) Time Elapsed 00:00:31.66 The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; msbuild ./projectName.csproj /p:Configuration=Debug' returned a non-zero code: 1

He estado atascado en este problema durante días. Cualquier consejo sería muy apreciado.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Asignar más memoria a la compilación resolvió este problema.

 docker build -t projectName -m 4g .
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!