{"action":"created","issue":{"url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/issues/43","repository_url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter","labels_url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/issues/43/labels{/name}","comments_url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/issues/43/comments","events_url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/issues/43/events","html_url":"https://github.com/machine-visualstudio/machine.vstestadapter/issues/43","id":138944735,"number":43,"title":"The process cannot access the file 'xyz\\Machine.Specifications.VSRunner.dll' because it is being used by another process.","user":{"login":"jonathh21","id":13969744,"avatar_url":"https://avatars.githubusercontent.com/u/13969744?v=3","gravatar_id":"","url":"https://api.github.com/users/jonathh21","html_url":"https://github.com/jonathh21","followers_url":"https://api.github.com/users/jonathh21/followers","following_url":"https://api.github.com/users/jonathh21/following{/other_user}","gists_url":"https://api.github.com/users/jonathh21/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathh21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathh21/subscriptions","organizations_url":"https://api.github.com/users/jonathh21/orgs","repos_url":"https://api.github.com/users/jonathh21/repos","events_url":"https://api.github.com/users/jonathh21/events{/privacy}","received_events_url":"https://api.github.com/users/jonathh21/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"ivanz","id":79742,"avatar_url":"https://avatars.githubusercontent.com/u/79742?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanz","html_url":"https://github.com/ivanz","followers_url":"https://api.github.com/users/ivanz/followers","following_url":"https://api.github.com/users/ivanz/following{/other_user}","gists_url":"https://api.github.com/users/ivanz/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanz/subscriptions","organizations_url":"https://api.github.com/users/ivanz/orgs","repos_url":"https://api.github.com/users/ivanz/repos","events_url":"https://api.github.com/users/ivanz/events{/privacy}","received_events_url":"https://api.github.com/users/ivanz/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/milestones/2","html_url":"https://github.com/machine-visualstudio/machine.vstestadapter/milestones/2.0.0","labels_url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/milestones/2/labels","id":1547773,"number":2,"title":"2.0.0","description":"","creator":{"login":"ivanz","id":79742,"avatar_url":"https://avatars.githubusercontent.com/u/79742?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanz","html_url":"https://github.com/ivanz","followers_url":"https://api.github.com/users/ivanz/followers","following_url":"https://api.github.com/users/ivanz/following{/other_user}","gists_url":"https://api.github.com/users/ivanz/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanz/subscriptions","organizations_url":"https://api.github.com/users/ivanz/orgs","repos_url":"https://api.github.com/users/ivanz/repos","events_url":"https://api.github.com/users/ivanz/events{/privacy}","received_events_url":"https://api.github.com/users/ivanz/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":11,"state":"open","created_at":"2016-01-27T21:12:49Z","updated_at":"2016-03-08T20:40:09Z","due_on":null,"closed_at":null},"comments":17,"created_at":"2016-03-07T10:30:14Z","updated_at":"2016-03-08T21:22:38Z","closed_at":"2016-03-08T20:40:09Z","body":"Hi,\r\n\r\nOne of my colleagues is quite consistently seeing the error as below:\r\n\r\nError: Machine Specifications Visual Studio Test Adapter - Error while executing specifications in assembly xyz.dll - The process cannot access the file 'xyz\\Machine.Specifications.VSRunner.dll' because it is being used by another process.\r\n\r\nI can't recreate it, but I suspect it relates to the fact that the test adapter is dynamically creating and deleting an aggregated file \r\n\r\n                    string path = Path.Combine(baseDirectory, runnerDllName);\r\n                    if (File.Exists(path))\r\n                    {\r\n                        File.Delete(path);\r\n                    }\r\n\r\nI am not really sure why it has to create/delete a file with each run it doesn't sound sensible.. but it might need a guid or something in there too?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/issues/comments/193973457","html_url":"https://github.com/machine-visualstudio/machine.vstestadapter/issues/43#issuecomment-193973457","issue_url":"https://api.github.com/repos/machine-visualstudio/machine.vstestadapter/issues/43","id":193973457,"user":{"login":"ivanz","id":79742,"avatar_url":"https://avatars.githubusercontent.com/u/79742?v=3","gravatar_id":"","url":"https://api.github.com/users/ivanz","html_url":"https://github.com/ivanz","followers_url":"https://api.github.com/users/ivanz/followers","following_url":"https://api.github.com/users/ivanz/following{/other_user}","gists_url":"https://api.github.com/users/ivanz/gists{/gist_id}","starred_url":"https://api.github.com/users/ivanz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivanz/subscriptions","organizations_url":"https://api.github.com/users/ivanz/orgs","repos_url":"https://api.github.com/users/ivanz/repos","events_url":"https://api.github.com/users/ivanz/events{/privacy}","received_events_url":"https://api.github.com/users/ivanz/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T21:22:38Z","updated_at":"2016-03-08T21:22:38Z","body":"@jonathh21 The current code doesn't delete any files other than the shadow copy assembly cache in C:\\windows\\temp so you should be fine. I will have a think if there is a way to clean-up those assemblies, but in your scenario (multiple test files in same folder) it will be non-trivial if impossible, because the vstest.console is spinning up multiple processes  of the mspec adaptor. I will have a look at what the xunit and nunit do about this."}}