{"action":"created","issue":{"url":"https://api.github.com/repos/nunit/nunit/issues/1579","repository_url":"https://api.github.com/repos/nunit/nunit","labels_url":"https://api.github.com/repos/nunit/nunit/issues/1579/labels{/name}","comments_url":"https://api.github.com/repos/nunit/nunit/issues/1579/comments","events_url":"https://api.github.com/repos/nunit/nunit/issues/1579/events","html_url":"https://github.com/nunit/nunit/issues/1579","id":160702027,"number":1579,"title":"NUnit v3 dangerously overrides COMPLUS_Version environment variable","user":{"login":"ww898","id":2767027,"avatar_url":"https://avatars.githubusercontent.com/u/2767027?v=3","gravatar_id":"","url":"https://api.github.com/users/ww898","html_url":"https://github.com/ww898","followers_url":"https://api.github.com/users/ww898/followers","following_url":"https://api.github.com/users/ww898/following{/other_user}","gists_url":"https://api.github.com/users/ww898/gists{/gist_id}","starred_url":"https://api.github.com/users/ww898/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ww898/subscriptions","organizations_url":"https://api.github.com/users/ww898/orgs","repos_url":"https://api.github.com/users/ww898/repos","events_url":"https://api.github.com/users/ww898/events{/privacy}","received_events_url":"https://api.github.com/users/ww898/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-16T16:17:14Z","updated_at":"2016-06-16T16:57:18Z","closed_at":null,"body":"Why? All child processes will inherit it and TRY running under CLR v4.0.30319, but in fact some of them can't. Please remove it from your code or tell me the big reason why you did it. Now we should remove COMPLUS_Version  before run our tests..."},"comment":{"url":"https://api.github.com/repos/nunit/nunit/issues/comments/226546923","html_url":"https://github.com/nunit/nunit/issues/1579#issuecomment-226546923","issue_url":"https://api.github.com/repos/nunit/nunit/issues/1579","id":226546923,"user":{"login":"hypersw","id":2332070,"avatar_url":"https://avatars.githubusercontent.com/u/2332070?v=3","gravatar_id":"","url":"https://api.github.com/users/hypersw","html_url":"https://github.com/hypersw","followers_url":"https://api.github.com/users/hypersw/followers","following_url":"https://api.github.com/users/hypersw/following{/other_user}","gists_url":"https://api.github.com/users/hypersw/gists{/gist_id}","starred_url":"https://api.github.com/users/hypersw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hypersw/subscriptions","organizations_url":"https://api.github.com/users/hypersw/orgs","repos_url":"https://api.github.com/users/hypersw/repos","events_url":"https://api.github.com/users/hypersw/events{/privacy}","received_events_url":"https://api.github.com/users/hypersw/received_events","type":"User","site_admin":false},"created_at":"2016-06-16T16:57:18Z","updated_at":"2016-06-16T16:57:18Z","body":"There're lots of accepted ways for CLR selection, like `ICLRMetaHost` and `.config`. and so on, all of them non-viral for child processes. The problem with this one is that it affects any child processes run from tests in a totally unexpected way. But this can be mitigated if the agent process restores the state of the env vars after they have played their role.\r\n\r\nThe tests are targeting CLR4 because the test code is written with targetfx 4, like the rest of R# codebase, and cannot run on CLR2. The processes which have to be run to perform the activities being tested, including totally third-party ones like IIS Express, might well be targeting CLR2. In this case we need to run those child processes specifically in CLR2 to test our interaction with CLR2 processes.\r\n\r\nI guess that generally everybody is allowing environment variables to be inherited by the child process. The opposite is quite a rare case. You will have problems running a process with its env totally empty, including the well-known system stuff, and passing them selectively is a nontrivial procedure which is hardly ever needed.\r\n\r\nThe point is that this env var, which is a technical detail of nunit's selecting agent's clr version, should be kept to the agent itself and prevented from leaking into the users' code. Which should be easy to achieve in the agent startup code."}}
{"actor":{"display_login":"hypersw"}}