Non-deterministic concurrency issues in solutions with multiple projects
See original GitHub issueI’m seeing concurrency issues that occurs when calling dotnet build SomeProject.sln
. The errors I see do not occur on every build, nor does there seem to be any pattern to when they occur. The errors can occur on first builds after a fresh clone as much as they will occur on second and third builds.
The only thing that seems to be consistent is that it occurs in projects with multiple project references.
The project: DotNetTools.zip
Versions: dotnet-cli 1.0.0-preview4-004215 Windows 10
Detailed log: msbuild.log.txt
The errors:
CSC : error CS2012: Cannot open ‘C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\obj\Debug\netcoreapp1.0\Microsoft.DotNet.Watcher.Tools.Tests.dll’ for writing – ‘The process cannot access the file ‘C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\obj\Debug\netcoreapp1.0\Microsoft.DotNet.Watcher.Tools.Tests.dll’ because it is being used by another process.’ [C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\Microsoft.DotNet.Watcher.Tools.Tests.csproj]
C:\dev\Universe\DotNetTools.dotnet\sdk\1.0.0-preview4-004215\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(119,5): error MSB4018: The “GenerateRuntimeConfigurationFiles” task failed unexpectedly.\r [C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\Microsoft.DotNet.Watcher.Tools.Tests.csproj] C:\dev\Universe\DotNetTools.dotnet\sdk\1.0.0-preview4-004215\Sdks\Microsoft.NET.Sdk\build\Microsoft.NET.Sdk.targets(119,5): error MSB4018: System.IO.IOException: The process cannot access the file ‘C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\bin\Debug\netcoreapp1.0\Microsoft.DotNet.Watcher.Tools.Tests.runtimeconfig.json’ because it is being used by another process.\r [C:\dev\Universe\DotNetTools\test\Microsoft.DotNet.Watcher.Tools.Tests\Microsoft.DotNet.Watcher.Tools.Tests.csproj]
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:13 (12 by maintainers)
Top GitHub Comments
Closing this again as the cause of the issues in Roslyn is different than what was fixed for #739, which was almost certainly a dupe of this.
https://github.com/dotnet/roslyn/pull/22232 will fix things for Roslyn
https://github.com/dotnet/sdk/issues/1599 tracks better diagnostics/experience in this explicit-documentation-file-vs-multi-targeting case.
Thanks, that will help a lot.