Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetCultureAttribute is absent #1696

Closed
xplicit opened this issue Jul 24, 2016 · 5 comments
Closed

SetCultureAttribute is absent #1696

xplicit opened this issue Jul 24, 2016 · 5 comments

Comments

@xplicit
Copy link

xplicit commented Jul 24, 2016

I am trying to use SetCulture attribute on a test method with NUnit3 on .NET Core, but looks it is missing in nunit.framework assembly. Is it possible to use SetCulture with .NET core?

using NUnit.Framework;    

[Test]
[SetCulture("fr-FR")]
public void Test()
{
}

error CS0246: The type or namespace name 'SetCulture' could not be found (are you missing a using directive or an assembly reference?)

In project.json I reference this version of NUnit:
"NUnitLite" : "3.2.1",

@CharliePoole
Copy link
Contributor

Currently, on .NET Core, you use the PCL build of the nunit framework, It's not possible to support setting the current culture in this build.

We are planning future netstandard builds, which may allow supporting this feature.

@gfoidl
Copy link

gfoidl commented Aug 27, 2017

In netcoreapp2.0 and <PackageReference Include="NUnit" Version="3.7.1" /> this Attribute is (still) not available. Are there any plans / official workarounds?


I know that the culture can be set in code via Thread.CurrentThread.CurrentCulture = CultureInfo.GetCultureInfo("de-AT");

@rprouse
Copy link
Member

rprouse commented Aug 27, 2017

@gfoidl I believe that to support Culture, we will need to release a .NET Standard 2.0 version of NUnit. I expect we will add that target for 3.9, but it definately won't be in the upcoming 3.8 release.

@rprouse
Copy link
Member

rprouse commented Aug 27, 2017

Since it is now possible to support, I am going to reopen this as an enhancement.

@rprouse rprouse reopened this Aug 27, 2017
@rprouse rprouse removed this from the Closed Without Action milestone Aug 27, 2017
@mikkelbu mikkelbu added this to the 3.11 milestone Nov 19, 2018
@mikkelbu
Copy link
Member

mikkelbu commented Nov 19, 2018

This was fixed in #2895 in release 3.11.

@rprouse I've added the milestone and closed this issue. I hope it does not break anything, doing this "retrospectively"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants