Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dotnet build sln file failing in Windows #545

Closed
livarcocc opened this issue Dec 21, 2016 · 7 comments
Closed

dotnet build sln file failing in Windows #545

livarcocc opened this issue Dec 21, 2016 · 7 comments
Assignees
Labels
Milestone

Comments

@livarcocc
Copy link
Contributor

We have logs for this here: https://ci.dot.net/job/dotnet_cli/job/rel_1.0.0/job/debug_windows_nt_x86_prtest/450/consoleFull. Just search for stack trace.

I am going to zip up some projects that reproed this in windows and add it here in a second.

Just do

dotnet restore TestApp.csproj
dotnet build TestApp.sln
@livarcocc
Copy link
Contributor Author

@clairernovotny
Copy link
Member

I've also had issues of msbuild /t:restore on solution files where the error is "sequence contains more than one element".

@jgoshi
Copy link
Contributor

jgoshi commented Jan 4, 2017

This appears to happen (sporadically) when you build an sln file that references a csproj file that is also referenced as a project dependency by another csproj file.

In this case (see the callstack below) TestLibrary is referenced in the sln and also is a project dependency of another csproj file referenced in the sln file. This appears to be some sort of timing issue.

Microsoft (R) Build Engine version 15.1.458.808 (TaskId:708)
Copyright (C) Microsoft Corporation. All rights reserved. (TaskId:708)
(TaskId:708)
TestLibrary -> /Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestLibrary/bin/Release/netstandard1.6/TestLibrary.dll (TaskId:708)
10:31:04.247 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: The "GenerateDepsFile" task failed unexpectedly. [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.247 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: System.IO.IOException: The process cannot access the file '/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/bin/Release/netstandard1.5/subdir.deps.json' because it is being used by another process. [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.247 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at System.IO.UnixFileStream.CheckFileCall(Int64 result, Boolean ignoreNotSupported) [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.248 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.248 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.248 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.248 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at Microsoft.NET.Build.Tasks.GenerateDepsFile.ExecuteCore() [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.248 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.248 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
10:31:04.248 3:9>/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/artifacts/osx.10.11-x64/stage2/sdk/1.0.0-preview5-004388/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(82,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__25.MoveNext() [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/subdir.csproj] [/Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/build/test/RunTest.proj]
subdir -> /Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestApp/src/subdir/bin/Release/netstandard1.5/subdir.dll (TaskId:708)
TestLibrary -> /Users/dotnet-bot/j/workspace/dotnet_cli/rel_1.0.0/release_osx_x64_prtest/test/dotnet-migrate.Tests/bin/Release/netcoreapp1.0/MigrateAndBuild/PJAppWithSlnAndXprojRefThatRefsCsprojWhereSlnDoesNotRefCsproj/TestLibrary/bin/Release/netstandard1.6/TestLibrary.dll (TaskId:708)

@jgoshi
Copy link
Contributor

jgoshi commented Jan 4, 2017

Note that this also fails on other platforms (not just Windows).

@srivatsn
Copy link
Contributor

srivatsn commented Feb 1, 2017

@nguerrera @rainersigwald - does this look the concurrency issue as well?

@rainersigwald
Copy link
Member

Yes, I'd bet this is a dupe of #739.

@dsplaisted
Copy link
Member

OK, closing this issue as a dupe of #739

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants