## CurrentCulture and CurrentUICulture flow across tasks ### Scope Minor ### Version Introduced 4.6 ### Version Reverted 4.6.2 ### Source Analyzer Status Planned ### Change Description Beginning in the .NET Framework 4.6, and are stored in the thread's , which flows across asynchronous operations. This means that changes to or will be reflected in tasks which are later run asynchronously. This is different from the behavior of previous .NET Framework versions (which would reset and in all asynchronous tasks). - [x] Quirked - [ ] Build-time break ### Recommended Action Apps affected by this change may work around it by explicitly setting the desired or as the first operation in an async Task. Alternatively, the old behavior (of not flowing /) may be opted into by setting the following compatibility switch: ```csharp AppContext.SetSwitch("Switch.System.Globalization.NoAsyncCurrentCulture", true); ``` This issue has been fixed by WPF in .NET Framework 4.6.2. It has also been fixed in .NET Frameworks 4.6, 4.6.1 through [KB 3139549](https://support.microsoft.com/kb/3139549). Applications targeting .NET Framework 4.6 or later will automatically get the right behavior in WPF applications - /) would be preserved across Dispatcher operations. ### Affected APIs * `M:System.Globalization.CultureInfo.set_CurrentCulture(System.Globalization.CultureInfo)` * `M:System.Threading.Thread.set_CurrentCulture(System.Globalization.CultureInfo)` * `M:System.Globalization.CultureInfo.set_CurrentUICulture(System.Globalization.CultureInfo)` * `M:System.Threading.Thread.set_CurrentUICulture(System.Globalization.CultureInfo)` ### Category Core [More information](https://docs.microsoft.com/dotnet/api/system.globalization.cultureinfo#Async)