{"action":"created","issue":{"url":"https://api.github.com/repos/OpenCover/opencover/issues/368","labels_url":"https://api.github.com/repos/OpenCover/opencover/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/OpenCover/opencover/issues/368/comments","events_url":"https://api.github.com/repos/OpenCover/opencover/issues/368/events","html_url":"https://github.com/OpenCover/opencover/issues/368","id":118105981,"number":368,"title":"Empty code coverage with xunit.vsix (VS integration tests)","user":{"login":"kzu","id":169707,"avatar_url":"https://avatars.githubusercontent.com/u/169707?v=3","gravatar_id":"","url":"https://api.github.com/users/kzu","html_url":"https://github.com/kzu","followers_url":"https://api.github.com/users/kzu/followers","following_url":"https://api.github.com/users/kzu/following{/other_user}","gists_url":"https://api.github.com/users/kzu/gists{/gist_id}","starred_url":"https://api.github.com/users/kzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzu/subscriptions","organizations_url":"https://api.github.com/users/kzu/orgs","repos_url":"https://api.github.com/users/kzu/repos","events_url":"https://api.github.com/users/kzu/events{/privacy}","received_events_url":"https://api.github.com/users/kzu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OpenCover/opencover/labels/medium","name":"medium","color":"999999"},{"url":"https://api.github.com/repos/OpenCover/opencover/labels/support","name":"support","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-11-20T19:07:02Z","updated_at":"2015-12-18T03:23:34Z","closed_at":null,"body":"Hi there!\r\n\r\n[xunit.vsix](https://www.nuget.org/packages/xunit.vsix) provides an Xunit-based VS integration testing library, by launching VS, connecting to it and generally doing everything MSTest + [HostType(\"VS IDE\")] does for VS extensibility authors. Everything is working great except for collecting code coverage numbers :(.\r\n\r\nI've tried all the instructions on #109, [StackOverflow](http://stackoverflow.com/questions/27278266/using-opencover-to-run-coded-ui-tests-not-collecting-application-code) and everything in-between with no luck. (including reading on how you got Moles/Fakes to work). I also tried -register:user, -register:path32, manually regsvr32 x86\\OpenCover.Profiler.dll, creating the registry entries manually and even restarting Windows.\r\n\r\nI've created the [bare minimum VSIX extension](https://www.dropbox.com/s/vi37epcvh6l37k8/MyExtension.7z?dl=0) and its integration tests solution to reproduce the issue with minimal noise.\r\n\r\nYou only need to run the build.cmd script from a developer command prompt, and it will install the Xunit/OpenCover/ReportGenerator nuget packages, build the solution, and run the single integration test, which just invokes a single method in a MEF-exported VS service. The batch script sets the recommended envvars too.\r\n\r\nThe xunit.vsix nuget package includes the full source under the `src` folder, so you can also just run with the debugger attached and set breakpoints in that source and it will all work. Source also available here in [github](https://github.com/kzu/xunit.vsix). The code that propagates the profiler-related environment variables to the ProcessStartInfo before launching it is in the [VsClient](https://github.com/kzu/xunit.vsix/blob/master/src/Xunit.Vsix/VsClient.cs#L298) class. \r\n\r\nJust to make sure that all the vars are where I expect them to be, the integration test I created will just dump all envvars in the current process, which is the VS instance started to run it.\r\n\r\nI'm at a complete loss as to why it doesn't work, any help would be immensely appreciated!"},"comment":{"url":"https://api.github.com/repos/OpenCover/opencover/issues/comments/165659568","html_url":"https://github.com/OpenCover/opencover/issues/368#issuecomment-165659568","issue_url":"https://api.github.com/repos/OpenCover/opencover/issues/368","id":165659568,"user":{"login":"kzu","id":169707,"avatar_url":"https://avatars.githubusercontent.com/u/169707?v=3","gravatar_id":"","url":"https://api.github.com/users/kzu","html_url":"https://github.com/kzu","followers_url":"https://api.github.com/users/kzu/followers","following_url":"https://api.github.com/users/kzu/following{/other_user}","gists_url":"https://api.github.com/users/kzu/gists{/gist_id}","starred_url":"https://api.github.com/users/kzu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kzu/subscriptions","organizations_url":"https://api.github.com/users/kzu/orgs","repos_url":"https://api.github.com/users/kzu/repos","events_url":"https://api.github.com/users/kzu/events{/privacy}","received_events_url":"https://api.github.com/users/kzu/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T03:23:34Z","updated_at":"2015-12-18T03:23:34Z","body":"> Note that the quotes must be around the -filter: part, too\r\n\r\nFrom [SO](http://stackoverflow.com/questions/6829792/how-to-add-filters-to-opencover-tool-to-skip-some-of-the-classes-in-a-namespace), argh!\r\n"}}