{"action":"created","issue":{"url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/743","repository_url":"https://api.github.com/repos/AutoFixture/AutoFixture","labels_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/743/labels{/name}","comments_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/743/comments","events_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/743/events","html_url":"https://github.com/AutoFixture/AutoFixture/issues/743","id":215422525,"number":743,"title":"xUnit Theory with AutoData attribute is not dicovered by VS2017 with .NET Core 1.1","user":{"login":"funkyOne","id":2235489,"avatar_url":"https://avatars2.githubusercontent.com/u/2235489?v=3","gravatar_id":"","url":"https://api.github.com/users/funkyOne","html_url":"https://github.com/funkyOne","followers_url":"https://api.github.com/users/funkyOne/followers","following_url":"https://api.github.com/users/funkyOne/following{/other_user}","gists_url":"https://api.github.com/users/funkyOne/gists{/gist_id}","starred_url":"https://api.github.com/users/funkyOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funkyOne/subscriptions","organizations_url":"https://api.github.com/users/funkyOne/orgs","repos_url":"https://api.github.com/users/funkyOne/repos","events_url":"https://api.github.com/users/funkyOne/events{/privacy}","received_events_url":"https://api.github.com/users/funkyOne/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-20T13:38:10Z","updated_at":"2017-03-21T07:30:11Z","closed_at":null,"body":"**VS2017 with .NET Core 1.1 (Core Tools 1.0)**\r\n\r\nWhile they're perfectly discovered and run by `dotnet test` , such xUnit `Theory` tests with `AutoData` attribute aren't visible in Visual Studio 2017 Test Explorer.\r\n\r\n**XUnitTestProject1.csrpoj**\r\n```\r\n<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n  <PropertyGroup>    \r\n    <TargetFramework>net461</TargetFramework>\r\n  </PropertyGroup>\r\n\r\n  <ItemGroup>\r\n    <PackageReference Include=\"AutoFixture\" Version=\"3.50.2\" />\r\n    <PackageReference Include=\"AutoFixture.AutoMoq\" Version=\"3.50.2\" />\r\n    <PackageReference Include=\"AutoFixture.Xunit2\" Version=\"3.50.2\" />    \r\n    <PackageReference Include=\"Microsoft.NET.Test.Sdk\" Version=\"15.0.0\" />\r\n    <PackageReference Include=\"xunit\" Version=\"2.2.0\" />\r\n    <PackageReference Include=\"xunit.runner.visualstudio\" Version=\"2.2.0\" />\r\n  </ItemGroup>\r\n\r\n  <ItemGroup>\r\n    <Service Include=\"{82a7f48d-3b50-4b1e-b82e-3ada8210c358}\" />\r\n  </ItemGroup>\r\n\r\n</Project>\r\n```\r\n**UnitTest1.cs**\r\n```\r\nusing Ploeh.AutoFixture.Xunit2;\r\nusing Xunit;\r\n\r\nnamespace XUnitTestProject1\r\n{\r\n    public class UnitTest1\r\n    {\r\n        [Fact]\r\n        public void Test1()\r\n        {\r\n        }\r\n\r\n        [Theory]\r\n        [InlineData(\"goodnight moon\", \"moon\", true)]\r\n        [InlineData(\"hello world\", \"hi\", false)]\r\n        public void Contains(string input, string sub, bool expected)\r\n        {\r\n            var actual = input.Contains(sub);\r\n\r\n            Assert.Equal(expected, actual);\r\n        }\r\n\r\n        [Theory, AutoData]\r\n        public void Contains2(string input, string sub, bool expected)\r\n        {\r\n            var actual = input.Contains(sub);\r\n\r\n            Assert.Equal(expected, actual);\r\n        }\r\n    }\r\n}\r\n```\r\n**Current behavior** \r\nTest1, Contains are discovered but Contains2 isn't.\r\n\r\n**Expected behavior**\r\nTest1, Contains, Contains2 are discovered.\r\n\r\n![screenshot](https://cloud.githubusercontent.com/assets/2235489/24102260/657c5c76-0d8c-11e7-870b-d4d59c43357a.PNG)\r\n**Repro project**\r\n[XUnitTestProject1.zip](https://github.com/AutoFixture/AutoFixture/files/854976/XUnitTestProject1.zip)"},"comment":{"url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/comments/287997675","html_url":"https://github.com/AutoFixture/AutoFixture/issues/743#issuecomment-287997675","issue_url":"https://api.github.com/repos/AutoFixture/AutoFixture/issues/743","id":287997675,"user":{"login":"funkyOne","id":2235489,"avatar_url":"https://avatars2.githubusercontent.com/u/2235489?v=3","gravatar_id":"","url":"https://api.github.com/users/funkyOne","html_url":"https://github.com/funkyOne","followers_url":"https://api.github.com/users/funkyOne/followers","following_url":"https://api.github.com/users/funkyOne/following{/other_user}","gists_url":"https://api.github.com/users/funkyOne/gists{/gist_id}","starred_url":"https://api.github.com/users/funkyOne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/funkyOne/subscriptions","organizations_url":"https://api.github.com/users/funkyOne/orgs","repos_url":"https://api.github.com/users/funkyOne/repos","events_url":"https://api.github.com/users/funkyOne/events{/privacy}","received_events_url":"https://api.github.com/users/funkyOne/received_events","type":"User","site_admin":false},"created_at":"2017-03-21T07:30:11Z","updated_at":"2017-03-21T07:30:11Z","body":"Just that learned it's a defect in vstest - [https://github.com/Microsoft/vstest/issues/428](https://github.com/Microsoft/vstest/issues/428)\r\n\r\nWorkaround is to add the following into test proj file\r\n```\r\n<PropertyGroup>\r\n  <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>\r\n  <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>\r\n</PropertyGroup>\r\n```"}}
{"actor":{"display_login":"funkyOne"}}