{"action":"created","issue":{"url":"https://api.github.com/repos/xunit/xunit/issues/1555","repository_url":"https://api.github.com/repos/xunit/xunit","labels_url":"https://api.github.com/repos/xunit/xunit/issues/1555/labels{/name}","comments_url":"https://api.github.com/repos/xunit/xunit/issues/1555/comments","events_url":"https://api.github.com/repos/xunit/xunit/issues/1555/events","html_url":"https://github.com/xunit/xunit/issues/1555","id":271271962,"number":1555,"title":"Resources from Resx ignore current culture when running with xUnit","user":{"login":"GeorgDangl","id":10274404,"avatar_url":"https://avatars2.githubusercontent.com/u/10274404?v=4","gravatar_id":"","url":"https://api.github.com/users/GeorgDangl","html_url":"https://github.com/GeorgDangl","followers_url":"https://api.github.com/users/GeorgDangl/followers","following_url":"https://api.github.com/users/GeorgDangl/following{/other_user}","gists_url":"https://api.github.com/users/GeorgDangl/gists{/gist_id}","starred_url":"https://api.github.com/users/GeorgDangl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GeorgDangl/subscriptions","organizations_url":"https://api.github.com/users/GeorgDangl/orgs","repos_url":"https://api.github.com/users/GeorgDangl/repos","events_url":"https://api.github.com/users/GeorgDangl/events{/privacy}","received_events_url":"https://api.github.com/users/GeorgDangl/received_events","type":"User","site_admin":false},"labels":[{"id":241291820,"url":"https://api.github.com/repos/xunit/xunit/labels/help%20wanted","name":"help wanted","color":"c2e0c6","default":true},{"id":241290899,"url":"https://api.github.com/repos/xunit/xunit/labels/[a]%20Core%20framework","name":"[a] Core framework","color":"5319e7","default":false},{"id":75574707,"url":"https://api.github.com/repos/xunit/xunit/labels/[t]%20Bug","name":"[t] Bug","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-05T12:13:34Z","updated_at":"2017-12-30T07:26:36Z","closed_at":"2017-12-30T07:26:36Z","author_association":"NONE","body":"[The repro project is available here](https://github.com/GeorgDangl/xUnitCultureTests). I've noticed that due to a regression when my CI environment reported failing tests after an upgrade from `2.3.0-beta3-build3705` to `2.3.1`.\r\n\r\nThe tests work fine in the full .Net framework, only `netcoreapp` is failing.\r\n\r\nI've defined three resource files, `Resource.resx`, `Resource.de.resx` and `Resource.fr.resx`, all contain a string `Greeting`.\r\n\r\nThen I have these tests:\r\n\r\n    [Fact]\r\n    public void CheckGermanCulture()\r\n    {\r\n        var expected = \"Guten Tag\";\r\n        var actual = GetResourceWithCulture(\"de\");\r\n        Assert.Equal(expected, actual);\r\n    }\r\n\r\n     [Fact]\r\n    public void CheckFrenchCulture()\r\n    {\r\n        var expected = \"Bonjour\";\r\n        var actual = GetResourceWithCulture(\"fr\");\r\n        Assert.Equal(expected, actual);\r\n    }\r\n\r\n    private string GetResourceWithCulture(string cultureName)\r\n    {\r\n        var culture = new CultureInfo(cultureName);\r\n        CultureInfo.CurrentCulture = culture;\r\n        CultureInfo.CurrentUICulture = culture;\r\n        var resource = Resource.Greeting;\r\n        return resource;\r\n    }\r\n\r\nThe tests pass in `dotnet test` but fail with `dotnet xunit`. I'm currently using xUnit 2.3.1.\r\n\r\nHere's the output:\r\n\r\n## Output with xUnit\r\n\r\n`dotnet xunit`\r\n\r\n    Detecting target frameworks in xUnitCulture.csproj...\r\n    Building for framework netcoreapp2.0...\r\n      xUnitCulture -> C:\\Users\\Georg\\Desktop\\xUnitCulture\\bin\\Debug\\netcoreapp2.0\\xUnitCulture.dll\r\n    Running .NET Core 2.0.0 tests for framework netcoreapp2.0...\r\n    xUnit.net Console Runner (64-bit .NET Core 4.6.00001.0)\r\n      Discovering: xUnitCulture\r\n      Discovered:  xUnitCulture\r\n      Starting:    xUnitCulture\r\n        xUnitCulture.UnitTest1.CheckGermanCulture [FAIL]\r\n          Assert.Equal() Failure\r\n                    ↓ (pos 0)\r\n          Expected: Guten Tag\r\n          Actual:   Hello\r\n                    ↑ (pos 0)\r\n          Stack Trace:\r\n            C:\\Users\\Georg\\Desktop\\xUnitCulture\\UnitTest1.cs(14,0): at xUnitCulture.UnitTest1.CheckGermanCulture()\r\n        xUnitCulture.UnitTest1.CheckFrenchCulture [FAIL]\r\n          Assert.Equal() Failure\r\n                    ↓ (pos 0)\r\n          Expected: Bonjour\r\n          Actual:   Hello\r\n                    ↑ (pos 0)\r\n          Stack Trace:\r\n            C:\\Users\\Georg\\Desktop\\xUnitCulture\\UnitTest1.cs(22,0): at xUnitCulture.UnitTest1.CheckFrenchCulture()\r\n      Finished:    xUnitCulture\r\n    === TEST EXECUTION SUMMARY ===\r\n       xUnitCulture  Total: 2, Errors: 0, Failed: 2, Skipped: 0, Time: 0,153s\r\n\r\n## Output with dotnet test\r\n\r\n`dotnet test`\r\n\r\n    Build started, please wait...\r\n    Build completed.\r\n    \r\n    Test run for C:\\Users\\Georg\\Desktop\\xUnitCulture\\bin\\Debug\\netcoreapp2.0\\xUnitCulture.dll(.NETCoreApp,Version=v2.0)\r\n    Microsoft (R) Testausführungs-Befehlszeilentool Version 15.3.0-preview-20170628-02\r\n    Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.\r\n    \r\n    Die Testausführung wird gestartet, bitte warten...\r\n    [xUnit.net 00:00:00.3232283]   Discovering: xUnitCulture\r\n    [xUnit.net 00:00:00.3934721]   Discovered:  xUnitCulture\r\n    [xUnit.net 00:00:00.3976951]   Starting:    xUnitCulture\r\n    [xUnit.net 00:00:00.5044358]   Finished:    xUnitCulture\r\n    \r\n    Tests gesamt: 2. Bestanden: 2. Fehler: 0. Übersprungen: 0.\r\n    Der Testlauf war erfolgreich.\r\n    Testausführungszeit: 0,9478 Sekunden\r\n"},"comment":{"url":"https://api.github.com/repos/xunit/xunit/issues/comments/354532148","html_url":"https://github.com/xunit/xunit/issues/1555#issuecomment-354532148","issue_url":"https://api.github.com/repos/xunit/xunit/issues/1555","id":354532148,"user":{"login":"bradwilson","id":16944,"avatar_url":"https://avatars3.githubusercontent.com/u/16944?v=4","gravatar_id":"","url":"https://api.github.com/users/bradwilson","html_url":"https://github.com/bradwilson","followers_url":"https://api.github.com/users/bradwilson/followers","following_url":"https://api.github.com/users/bradwilson/following{/other_user}","gists_url":"https://api.github.com/users/bradwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/bradwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradwilson/subscriptions","organizations_url":"https://api.github.com/users/bradwilson/orgs","repos_url":"https://api.github.com/users/bradwilson/repos","events_url":"https://api.github.com/users/bradwilson/events{/privacy}","received_events_url":"https://api.github.com/users/bradwilson/received_events","type":"User","site_admin":false},"created_at":"2017-12-30T07:26:36Z","updated_at":"2017-12-30T07:26:36Z","author_association":"OWNER","body":"Verified fixed with 2.4.0-beta1-build3897:\r\n\r\n![image](https://user-images.githubusercontent.com/16944/34452235-ace6a6c8-ecef-11e7-8184-a0d34d74d024.png)\r\n"}}
{"actor":{"display_login":"bradwilson"}}