C# Dev Kit on VsCode fails due to missing icu package

When starting vscode in a C# project I get this output from C# Dev Kit

Starting Spawn .NET server...
Using dotnet resolution provided by ".NET Install Tool".
Using acquired .NET runtime at "/home/dobiko/.config/Code/User/globalStorage/ms-dotnettools.vscode-dotnet-runtime/.dotnet/9.0.5~x64~aspnetcore/dotnet"
.NET Sdk found: "/nix/store/7rbmdw7yj75l9vz1r7kr4wg1zrzya7g5-dotnet-sdk-8.0.408/share/dotnet/dotnet".
.NET server STDERR: Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.
   at System.Environment.FailFast(System.Runtime.CompilerServices.StackCrawlMarkHandle, System.String, System.Runtime.CompilerServices.ObjectHandleOnStack, System.String)
   at System.Environment.FailFast(System.Threading.StackCrawlMark ByRef, System.String, System.Exception, System.String)
   at System.Environment.FailFast(System.String)
   at System.Globalization.GlobalizationMode+Settings..cctor()
   at System.Globalization.CultureData.CreateCultureWithInvariantData()
   at System.Globalization.CultureData.get_Invariant()
   at System.Globalization.CultureInfo..cctor()
   at System.Globalization.CultureInfo.get_CachedCulturesByName()
   at System.Globalization.CultureInfo.GetCultureInfo(System.String)

.NET server STDERR:    at Microsoft.VisualStudio.Server.VSCodeCultureInheritance.InheritCultureFromVSCode()
   at Microsoft.VisualStudio.Server.ServiceBroker.Program+<Main>d__7.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.VisualStudio.Server.ServiceBroker.Program+<Main>d__7, Microsoft.VisualStudio.Code.Server, Version=0.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<Main>d__7 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder1[[System.Int32, System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]].Start[[Microsoft.VisualStudio.Server.ServiceBroker.Program+<Main>d__7, Microsoft.VisualStudio.Code.Server, Version=0.2.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]](<Main>d__7 ByRef)
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.Main(System.String[])
   at Microsoft.VisualStudio.Server.ServiceBroker.Program.<Main>(System.String[])

I already tried installking pkgs.icu, changing the dotnet sdk path in vscode and appending $LD_LIBRARY_PATH with the icu path

I’m adding this line in user setting of vscode- believe that it was due to the same error:

1 Like

What helped was 1. using the fhs package and 2. the the settings tip. Thanks ^^
I now personally use:

"dotnetAcquisitionExtension.sharedExistingDotnetPath": "~/.nix-profile/bin/dotnet",
"dotnetAcquisitionExtension.allowInvalidPaths": true,