{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn-project-system/issues/976","repository_url":"https://api.github.com/repos/dotnet/roslyn-project-system","labels_url":"https://api.github.com/repos/dotnet/roslyn-project-system/issues/976/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn-project-system/issues/976/comments","events_url":"https://api.github.com/repos/dotnet/roslyn-project-system/issues/976/events","html_url":"https://github.com/dotnet/roslyn-project-system/issues/976","id":196043210,"number":976,"title":"No tests are discovered when multi-targetting","user":{"login":"gulbanana","id":1612285,"avatar_url":"https://avatars.githubusercontent.com/u/1612285?v=3","gravatar_id":"","url":"https://api.github.com/users/gulbanana","html_url":"https://github.com/gulbanana","followers_url":"https://api.github.com/users/gulbanana/followers","following_url":"https://api.github.com/users/gulbanana/following{/other_user}","gists_url":"https://api.github.com/users/gulbanana/gists{/gist_id}","starred_url":"https://api.github.com/users/gulbanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gulbanana/subscriptions","organizations_url":"https://api.github.com/users/gulbanana/orgs","repos_url":"https://api.github.com/users/gulbanana/repos","events_url":"https://api.github.com/users/gulbanana/events{/privacy}","received_events_url":"https://api.github.com/users/gulbanana/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-16T11:54:25Z","updated_at":"2016-12-21T11:44:30Z","closed_at":null,"body":"This is a project file created from the default template and then edited to add a second TFM.\r\n```\r\n<Project Sdk=\"Microsoft.NET.Sdk\" ToolsVersion=\"15.0\">\r\n  <PropertyGroup>\r\n    <OutputType>Exe</OutputType>\r\n    <TargetFrameworks>netcoreapp1.0;net461</TargetFrameworks>\r\n    <RuntimeIdentifier Condition=\"'$(TargetFramework)' == 'net461'\">win7-x86</RuntimeIdentifier>\r\n  </PropertyGroup>\r\n  <ItemGroup>\r\n    <Compile Include=\"**\\*.cs\" />\r\n    <EmbeddedResource Include=\"**\\*.resx\" />\r\n  </ItemGroup>\r\n  <ItemGroup>\r\n    <PackageReference Condition=\" '$(TargetFramework)' == 'netcoreapp1.0' \" Include=\"Microsoft.NETCore.App\" Version=\"1.0.1\" />\r\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"15.0.0-preview-20161123-03\" />\r\n    <PackageReference Include=\"xunit\" Version=\"2.2.0-beta4-build3444\" />\r\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.2.0-beta4-build1194\" />\r\n  </ItemGroup>\r\n</Project>\r\n```\r\n\r\nNo tests are discovered for either TFM, although each works separately (e.g. if the TargetFrameworks is changed to TargetFramework). Here is the build log with /v:diag, which includes a warning about irreconcilable dependencies and some issues finding test adapters: https://gist.github.com/gulbanana/add7c9bbc4eecfdd7c4bd5b4af7fea5f"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn-project-system/issues/comments/268503286","html_url":"https://github.com/dotnet/roslyn-project-system/issues/976#issuecomment-268503286","issue_url":"https://api.github.com/repos/dotnet/roslyn-project-system/issues/976","id":268503286,"user":{"login":"gulbanana","id":1612285,"avatar_url":"https://avatars.githubusercontent.com/u/1612285?v=3","gravatar_id":"","url":"https://api.github.com/users/gulbanana","html_url":"https://github.com/gulbanana","followers_url":"https://api.github.com/users/gulbanana/followers","following_url":"https://api.github.com/users/gulbanana/following{/other_user}","gists_url":"https://api.github.com/users/gulbanana/gists{/gist_id}","starred_url":"https://api.github.com/users/gulbanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gulbanana/subscriptions","organizations_url":"https://api.github.com/users/gulbanana/orgs","repos_url":"https://api.github.com/users/gulbanana/repos","events_url":"https://api.github.com/users/gulbanana/events{/privacy}","received_events_url":"https://api.github.com/users/gulbanana/received_events","type":"User","site_admin":false},"created_at":"2016-12-21T11:44:30Z","updated_at":"2016-12-21T11:44:30Z","body":"OK, I've tried that and it doesn't fully work. Here is a repro: https://github.com/gulbanana/repro-testdiscovery-multitarget\r\n\r\nWith this setup, `dotnet test` runs tests for both tfms. However, Visual Studio does not discover any tests at all. If you change the order of target frameworks to `netcoreapp1.0;net461` then Visual Studio is able to discover only the netcoreapp tests, but still not the net461 ones. Unfortunately keeping the existing full-framework tests working is my priority in the real code!"}}
{"actor":{"display_login":"gulbanana"}}