{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/8960","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/8960/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/8960/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/8960/events","html_url":"https://github.com/dotnet/corefx/issues/8960","id":157408122,"number":8960,"title":"Building System.Data.SqlClient.sln in parallel often fails","user":{"login":"svick","id":287848,"avatar_url":"https://avatars.githubusercontent.com/u/287848?v=3","gravatar_id":"","url":"https://api.github.com/users/svick","html_url":"https://github.com/svick","followers_url":"https://api.github.com/users/svick/followers","following_url":"https://api.github.com/users/svick/following{/other_user}","gists_url":"https://api.github.com/users/svick/gists{/gist_id}","starred_url":"https://api.github.com/users/svick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svick/subscriptions","organizations_url":"https://api.github.com/users/svick/orgs","repos_url":"https://api.github.com/users/svick/repos","events_url":"https://api.github.com/users/svick/events{/privacy}","received_events_url":"https://api.github.com/users/svick/received_events","type":"User","site_admin":false},"labels":[{"id":335854516,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Data.SqlClient","name":"area-System.Data.SqlClient","color":"d4c5f9","default":false},{"id":174888041,"url":"https://api.github.com/repos/dotnet/corefx/labels/Infrastructure","name":"Infrastructure","color":"fbca04","default":false},{"id":311091887,"url":"https://api.github.com/repos/dotnet/corefx/labels/os-windows","name":"os-windows","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":{"login":"corivera","id":12820011,"avatar_url":"https://avatars.githubusercontent.com/u/12820011?v=3","gravatar_id":"","url":"https://api.github.com/users/corivera","html_url":"https://github.com/corivera","followers_url":"https://api.github.com/users/corivera/followers","following_url":"https://api.github.com/users/corivera/following{/other_user}","gists_url":"https://api.github.com/users/corivera/gists{/gist_id}","starred_url":"https://api.github.com/users/corivera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corivera/subscriptions","organizations_url":"https://api.github.com/users/corivera/orgs","repos_url":"https://api.github.com/users/corivera/repos","events_url":"https://api.github.com/users/corivera/events{/privacy}","received_events_url":"https://api.github.com/users/corivera/received_events","type":"User","site_admin":false},"assignees":[{"login":"corivera","id":12820011,"avatar_url":"https://avatars.githubusercontent.com/u/12820011?v=3","gravatar_id":"","url":"https://api.github.com/users/corivera","html_url":"https://github.com/corivera","followers_url":"https://api.github.com/users/corivera/followers","following_url":"https://api.github.com/users/corivera/following{/other_user}","gists_url":"https://api.github.com/users/corivera/gists{/gist_id}","starred_url":"https://api.github.com/users/corivera/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/corivera/subscriptions","organizations_url":"https://api.github.com/users/corivera/orgs","repos_url":"https://api.github.com/users/corivera/repos","events_url":"https://api.github.com/users/corivera/events{/privacy}","received_events_url":"https://api.github.com/users/corivera/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dotnet/corefx/milestones/4","html_url":"https://github.com/dotnet/corefx/milestones/1.2.0","labels_url":"https://api.github.com/repos/dotnet/corefx/milestones/4/labels","id":1248719,"number":4,"title":"1.2.0","description":".NET Core 1.2 Placeholder.  https://github.com/dotnet/core/blob/master/roadmap.md","creator":{"login":"joshfree","id":1302850,"avatar_url":"https://avatars.githubusercontent.com/u/1302850?v=3","gravatar_id":"","url":"https://api.github.com/users/joshfree","html_url":"https://github.com/joshfree","followers_url":"https://api.github.com/users/joshfree/followers","following_url":"https://api.github.com/users/joshfree/following{/other_user}","gists_url":"https://api.github.com/users/joshfree/gists{/gist_id}","starred_url":"https://api.github.com/users/joshfree/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshfree/subscriptions","organizations_url":"https://api.github.com/users/joshfree/orgs","repos_url":"https://api.github.com/users/joshfree/repos","events_url":"https://api.github.com/users/joshfree/events{/privacy}","received_events_url":"https://api.github.com/users/joshfree/received_events","type":"User","site_admin":false},"open_issues":480,"closed_issues":1590,"state":"open","created_at":"2015-08-10T18:04:00Z","updated_at":"2016-11-11T21:39:06Z","due_on":"2017-04-30T07:00:00Z","closed_at":null},"comments":4,"created_at":"2016-05-29T21:49:51Z","updated_at":"2016-11-11T21:47:45Z","closed_at":"2016-11-11T19:58:02Z","body":"When I build System.Data.SqlClient.sln without parallelization, it works fine (but notice the same file is built twice):\n\n```\n>msbuild /v:m /t:rebuild System.Data.SqlClient.sln\nMicrosoft (R) Build Engine version 14.0.25123.0\nCopyright (C) Microsoft Corporation. All rights reserved.\n\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\ref\\System.Data.SqlClient\\4.1.0.0\\System.Data.SqlClient.dll\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient\\System.Data.SqlClient.dll\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient\\System.Data.SqlClient.dll\n  System.Data.SqlClient.Tests -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient.Tests\\System.Data.SqlClient.Tests.dll\n  System.Data.SqlClient.ManualTesting.Tests -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient.ManualTesting.Tests\\System.Data.SqlClient.ManualTesting.Tests.dll\n```\n\nBut when I build it in parallel, it often (but not always) fails:\n\n```\n>msbuild /v:m /m /t:rebuild System.Data.SqlClient.sln\nMicrosoft (R) Build Engine version 14.0.25123.0\nCopyright (C) Microsoft Corporation. All rights reserved.\n\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\ref\\System.Data.SqlClient\\4.1.0.0\\System.Data.SqlClient.dll\nE:\\Users\\Svick\\git\\corefx\\Tools\\sign.targets(70,5): error : E:\\Users\\Svick\\git\\corefx\\bin/obj/Windows_NT.AnyCPU.Debug/System.Data.SqlClient/System.Data.SqlClient.dll: I/O error reading or writing PE file: The process cannot access the f\nile 'E:\\Users\\Svick\\git\\corefx\\bin\\obj\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient\\System.Data.SqlClient.dll' because it is being used by another process. [E:\\Users\\Svick\\git\\corefx\\src\\System.Data.SqlClient\\src\\System.Data.SqlClient.\ncsproj]\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient\\System.Data.SqlClient.dll\n  System.Data.SqlClient.ManualTesting.Tests -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient.ManualTesting.Tests\\System.Data.SqlClient.ManualTesting.Tests.dll\n  System.Data.SqlClient.Tests -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient.Tests\\System.Data.SqlClient.Tests.dll\n```\n\nSometimes it just produces warnings:\n\n```\n>msbuild /v:m /m /t:rebuild System.Data.SqlClient.sln\nMicrosoft (R) Build Engine version 14.0.25123.0\nCopyright (C) Microsoft Corporation. All rights reserved.\n\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\ref\\System.Data.SqlClient\\4.1.0.0\\System.Data.SqlClient.dll\nC:\\Program Files (x86)\\MSBuild\\14.0\\bin\\Microsoft.Common.CurrentVersion.targets(1820,5): warning MSB3088: Could not read state file \"E:\\Users\\Svick\\git\\corefx\\bin/obj/Windows_NT.AnyCPU.De\nbug/System.Data.SqlClient/System.Data.SqlClient.csprojResolveAssemblyReference.cache\". The process cannot access the file 'E:\\Users\\Svick\\git\\corefx\\bin\\obj\\Windows_NT.AnyCPU.Debug\\System\n.Data.SqlClient\\System.Data.SqlClient.csprojResolveAssemblyReference.cache' because it is being used by another process. [E:\\Users\\Svick\\git\\corefx\\src\\System.Data.SqlClient\\src\\System.Da\nta.SqlClient.csproj]\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient\\System.Data.SqlClient.dll\n  System.Data.SqlClient -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient\\System.Data.SqlClient.dll\nC:\\Program Files (x86)\\MSBuild\\14.0\\bin\\Microsoft.Common.CurrentVersion.targets(3863,5): warning MSB3026: Could not copy \"E:\\Users\\Svick\\git\\corefx\\bin/obj/Windows_NT.AnyCPU.Debug/System.\nData.SqlClient/System.Data.SqlClient.pdb\" to \"E:\\Users\\Svick\\git\\corefx\\bin/Windows_NT.AnyCPU.Debug/System.Data.SqlClient/System.Data.SqlClient.pdb\". Beginning retry 1 in 1000ms. The proc\ness cannot access the file 'E:\\Users\\Svick\\git\\corefx\\bin/Windows_NT.AnyCPU.Debug/System.Data.SqlClient/System.Data.SqlClient.pdb' because it is being used by another process. [E:\\Users\\S\nvick\\git\\corefx\\src\\System.Data.SqlClient\\src\\System.Data.SqlClient.csproj]\n  System.Data.SqlClient.ManualTesting.Tests -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient.ManualTesting.Tests\\System.Data.SqlClient.ManualTesting.Tests.dll\n  System.Data.SqlClient.Tests -> E:\\Users\\Svick\\git\\corefx\\bin\\Windows_NT.AnyCPU.Debug\\System.Data.SqlClient.Tests\\System.Data.SqlClient.Tests.dll\n```\n\nI believe those issues are because the same project is built twice in parallel, causing a race condition.\n\nOther solutions have the same issue too, for example, System.Net.Http.sln.\n\nThis looks similar to #5292.\n\nCC: @weshaggard\n"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/260063203","html_url":"https://github.com/dotnet/corefx/issues/8960#issuecomment-260063203","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/8960","id":260063203,"user":{"login":"mellinoe","id":8918977,"avatar_url":"https://avatars.githubusercontent.com/u/8918977?v=3","gravatar_id":"","url":"https://api.github.com/users/mellinoe","html_url":"https://github.com/mellinoe","followers_url":"https://api.github.com/users/mellinoe/followers","following_url":"https://api.github.com/users/mellinoe/following{/other_user}","gists_url":"https://api.github.com/users/mellinoe/gists{/gist_id}","starred_url":"https://api.github.com/users/mellinoe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mellinoe/subscriptions","organizations_url":"https://api.github.com/users/mellinoe/orgs","repos_url":"https://api.github.com/users/mellinoe/repos","events_url":"https://api.github.com/users/mellinoe/events{/privacy}","received_events_url":"https://api.github.com/users/mellinoe/received_events","type":"User","site_admin":false},"created_at":"2016-11-11T21:47:45Z","updated_at":"2016-11-11T21:47:45Z","body":"Ah, I see. Building solution files isn't really something we've ever tested for or supported. They are essentially only there so that you can get Intellisense in Visual Studio, and outside of that they have many issues that we don't really try to fix. Including staying in sync with the actual project files, as you've noticed. I'm not familiar with \"why\", but it looks like running MSBuild on solution files seems to be less concerned about ordering things in the way that we need.\r\n\r\nBuilding individual project files, or `.builds` files, is the way that we want folks to do this."}}
{"actor":{"display_login":"mellinoe"}}