dotnet / dotnet/msbuild

Building inside a container fails with MSB3026 / MSB3027

Open
#2,198 7 comments 0 reactions 0 assignees View on GitHub
triaged
Dominant language
C#
Stars
5.5k
Forks
1.5k
Avg merge
1d 13h
Merged PRs (30d)
133

Description

_From @oyosefi on June 7, 2017 23:4_

Trying to build a sample dotnetcore API inside an SDK container:

Created a container and mounted a local folder (`docker run -v c:/docker:c:/docker -it --rm --memory 9072 microsoft/dotnet:2.0-sdk`).

Created an app using `dotnet new webapi`.
`dotnet restore` works fine.
`dotnet build` sometimes works.
dotnet publish -c Release -o out` mostly fails with:

C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 1 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 2 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 3 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 4 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 5 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 6 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 7 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 8 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 9 in 10
00ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): warning MSB3026: Coul
d not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Beginning retry 10 in 1
000ms. The data area passed to a system call is too small [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): error MSB3027: Could
not copy "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". Exceeded retry count of 1
0. Failed. [C:\docker\playground\playground.csproj]
C:\Program Files\dotnet\sdk\2.0.0-preview1-005977\Microsoft.Common.CurrentVersion.targets(3993,5): error MSB3021: Unable
to copy file "obj\Debug\netcoreapp2.0\playground.dll" to "bin\Debug\netcoreapp2.0\playground.dll". The data area passed
to a system call is too small [C:\docker\playground\playground.csproj]
10 Warning(s)
2 Error(s)

Any suggestions?

_Copied from original issue: dotnet/sdk#1319_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.