{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/3141","repository_url":"https://api.github.com/repos/Microsoft/msbuild","labels_url":"https://api.github.com/repos/Microsoft/msbuild/issues/3141/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/msbuild/issues/3141/comments","events_url":"https://api.github.com/repos/Microsoft/msbuild/issues/3141/events","html_url":"https://github.com/Microsoft/msbuild/issues/3141","id":309097837,"number":3141,"title":"Node reuse locks task assembly file","user":{"login":"natemcmaster","id":2696087,"avatar_url":"https://avatars0.githubusercontent.com/u/2696087?v=4","gravatar_id":"","url":"https://api.github.com/users/natemcmaster","html_url":"https://github.com/natemcmaster","followers_url":"https://api.github.com/users/natemcmaster/followers","following_url":"https://api.github.com/users/natemcmaster/following{/other_user}","gists_url":"https://api.github.com/users/natemcmaster/gists{/gist_id}","starred_url":"https://api.github.com/users/natemcmaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/natemcmaster/subscriptions","organizations_url":"https://api.github.com/users/natemcmaster/orgs","repos_url":"https://api.github.com/users/natemcmaster/repos","events_url":"https://api.github.com/users/natemcmaster/events{/privacy}","received_events_url":"https://api.github.com/users/natemcmaster/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-27T19:13:54Z","updated_at":"2018-03-27T19:17:02Z","closed_at":null,"author_association":"MEMBER","body":"We have build scripts that produce tasks as a local assembly. These assembly files are locked by the nodes, which means we can't use nodeReuse on repos that use custom local tasks.\r\n\r\n### Steps to reproduce\r\n\r\n1. Git clone https://github.com/aspnet/BuildTools/tree/6e2c86240ffd0056d202eb8ede1fba1e251804b4\r\n2. `build.cmd /p:SkipTests=true`\r\n3. `build.cmd /p:SkipTests=true`\r\n\r\n### Expected  behavior\r\nIt would be great if nodeReuse was savvy enough to handle changes to task assemblies on disk.\r\n\r\n### Actual behavior\r\n```\r\nC:\\Users\\namc\\.dotnet\\x64\\sdk\\2.1.300-preview2-008396\\Sdks\\Microsoft.NET.Sdk\\targets\\Microsoft.NET.Publish.targets(137,5): warning MSB3026: Could not copy \"obj\\Release\\netcoreapp2.0\\RepoTasks.dll\" to \"C:\\dev\\aspnet\\BuildTools\\build\\tasks\\bin\\publish\\RepoTasks.dll\". Beginning retry 1 in 1000ms. The process cannot access the file 'C:\\dev\\aspnet\\BuildTools\\build\\tasks\\bin\\publish\\RepoTasks.dll' because it is being used by another process.  [C:\\dev\\aspnet\\BuildTools\\build\\tasks\\RepoTasks.csproj]\r\n```\r\n\r\nThe process locking the file is\r\n```\r\nC:\\Users\\namc\\.dotnet\\x64\\dotnet.exe \"C:\\Users\\namc\\.dotnet\\x64\\sdk\\2.1.300-preview2-008396\\MSBuild.dll\" C:\\Users\\namc\\.dotnet\\x64\\sdk\\2.1.300-preview2-008396\\MSBuild.dll /nologo /nodemode:1 /nodeReuse:true\r\n```\r\n\r\n### Environment data\r\n```\r\n.NET Core SDK (reflecting any global.json):\r\n Version:   2.1.300-preview2-008396\r\n Commit:    400e670faa\r\n\r\nRuntime Environment:\r\n OS Name:     Windows\r\n OS Version:  10.0.16299\r\n OS Platform: Windows\r\n RID:         win10-x64\r\n Base Path:   C:\\Users\\namc\\.dotnet\\x64\\sdk\\2.1.300-preview2-008396\\\r\n```\r\n\r\n## Workaround\r\n```\r\nbuild.cmd /nodeReuse:false\r\n```"},"comment":{"url":"https://api.github.com/repos/Microsoft/msbuild/issues/comments/376642700","html_url":"https://github.com/Microsoft/msbuild/issues/3141#issuecomment-376642700","issue_url":"https://api.github.com/repos/Microsoft/msbuild/issues/3141","id":376642700,"user":{"login":"rainersigwald","id":3347530,"avatar_url":"https://avatars1.githubusercontent.com/u/3347530?v=4","gravatar_id":"","url":"https://api.github.com/users/rainersigwald","html_url":"https://github.com/rainersigwald","followers_url":"https://api.github.com/users/rainersigwald/followers","following_url":"https://api.github.com/users/rainersigwald/following{/other_user}","gists_url":"https://api.github.com/users/rainersigwald/gists{/gist_id}","starred_url":"https://api.github.com/users/rainersigwald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rainersigwald/subscriptions","organizations_url":"https://api.github.com/users/rainersigwald/orgs","repos_url":"https://api.github.com/users/rainersigwald/repos","events_url":"https://api.github.com/users/rainersigwald/events{/privacy}","received_events_url":"https://api.github.com/users/rainersigwald/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T19:17:02Z","updated_at":"2018-03-27T19:17:02Z","author_association":"CONTRIBUTOR","body":"This would be great but AFAIK it's impossible as .NET Core doesn't provide any way to unload an assembly."}}
{"actor":{"display_login":"rainersigwald"}}