bUnit icon indicating copy to clipboard operation
bUnit copied to clipboard

Ubuntu Build Pipeline fails in `netcoreapp3.1`

Open linkdotnet opened this issue 1 year ago • 3 comments

The CI fails with:

Couldn't find a valid ICU package installed on the system

Testhost process for source(s) '/home/runner/work/bUnit/bUnit/tests/bunit.web.tests/bin/Release/netcoreapp3.1/Bunit.Web.Tests.dll' exited with error: Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
   at System.Environment.FailFast(System.String)
   at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
   at System.Globalization.GlobalizationMode..cctor()
   at System.Globalization.CultureData.CreateCultureWithInvariantData()
   at System.Globalization.CultureData.get_Invariant()
   at System.Globalization.CultureInfo..cctor()
   at System.String.ToUpperInvariant()
   at System.Diagnostics.Tracing.EventSource.GetGuid(System.Type)
   at System.Diagnostics.Tracing.EventSource..ctor(System.Diagnostics.Tracing.EventSourceSettings, System.String[])
   at System.Diagnostics.Tracing.EventSource..ctor()
   at Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource..ctor()
   at Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource..cctor()
   at Microsoft.VisualStudio.TestPlatform.CoreUtilities.Tracing.TestPlatformEventSource.get_Instance()
   at Microsoft.VisualStudio.TestPlatform.TestHost.Program.Main(System.String[])
. Please check the diagnostic logs for more information.

Only onnetcoreapp3.1. For example here: https://github.com/bUnit-dev/bUnit/actions/runs/12791740053/job/35660541818?pr=1653

All other target frameworks are working just fine. This happens only on Ubuntu.

The solution might be

export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1

For the ubuntu runner.

Source: https://stackoverflow.com/a/64370938/1892523

linkdotnet avatar Jan 15 '25 15:01 linkdotnet

yeah saw that. perhaps we should make a v2 release that just cuts old out of support versions out and get ourselves out of all the troubles. then our perpetual v2 branch can be renamend to big-vnext instead :)

egil avatar Jan 15 '25 15:01 egil

If we keep that branch name then yes, otherwise no :)

we even might wanna keep all „old“ if NET6-0-AND-Older so we don’t have 24244227 merge conflicts

linkdotnet avatar Jan 15 '25 15:01 linkdotnet

Lets look at this on friday and see what makes sense :)

egil avatar Jan 15 '25 16:01 egil

We did this and no issue on v2 for obvious reasons.

linkdotnet avatar Aug 30 '25 11:08 linkdotnet