C# (Blazor) language server crashing on IDX

I install C# add-on by Muhamed-Sammy and I keep getting this error:

-------------------------------------------------------------------------------
Razor.VSCode version 9.0.0-preview.24467.1
--------------------------------------------------------------------------------
Razor's trace level is currently set to 'Off'
 - To change Razor's trace level set 'razor.trace' to 'Off', 'Messages' or 'Verbose' and then restart VSCode.
 - To report issues invoke the 'Report a Razor issue' command via the command palette.
-----------------------------------------------------------------------------------------------------------------------------

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.String)
   at System.Globalization.GlobalizationMode+Settings..cctor()
   at System.Globalization.Ordinal.IndexOfOrdinalIgnoreCase(System.ReadOnlySpan`1<Char>, System.ReadOnlySpan`1<Char>)
   at System.Globalization.Ordinal.IndexOf(System.String, System.String, Int32, Int32, Boolean)
   at System.String.Contains(System.String, System.StringComparison)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.Main(System.String[])
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.<Main>(System.String[])
[Info  - 1:10:17 PM] Connection to server got closed. Server will restart.
[Error - 1:10:17 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:17 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
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.String)
   at System.Globalization.GlobalizationMode+Settings..cctor()
   at System.Globalization.Ordinal.IndexOfOrdinalIgnoreCase(System.ReadOnlySpan`1<Char>, System.ReadOnlySpan`1<Char>)
   at System.Globalization.Ordinal.IndexOf(System.String, System.String, Int32, Int32, Boolean)
   at System.String.Contains(System.String, System.StringComparison)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.Main(System.String[])
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.<Main>(System.String[])
[Info  - 1:10:18 PM] Connection to server got closed. Server will restart.
[Error - 1:10:18 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:18 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Client - 1:10:18 PM] (Error) Failed when activating Razor VSCode.
Pending response rejected since connection got disposed
Stack Trace:
Error: Pending response rejected since connection got disposed
	at Object.dispose (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:636925)
	at Object.dispose (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:688698)
	at S.handleConnectionClosed (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:688976)
	at S.handleConnectionClosed (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:844573)
	at /home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:688786
	at i.invoke (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:638638)
	at o.fire (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:639403)
	at Z (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:625281)
	at i.invoke (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:638638)
	at o.fire (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:639403)
	at m.fireClose (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:647221)
	at Socket.<anonymous> (/home/user/.codeoss-cloudworkstations/extensions/muhammad-sammy.csharp-2.50.25-universal/dist/extension.js:2:648777)
	at Socket.emit (node:events:529:35)
	at Pipe.<anonymous> (node:net:350:12)
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.String)
   at System.Globalization.GlobalizationMode+Settings..cctor()
   at System.Globalization.Ordinal.IndexOfOrdinalIgnoreCase(System.ReadOnlySpan`1<Char>, System.ReadOnlySpan`1<Char>)
   at System.Globalization.Ordinal.IndexOf(System.String, System.String, Int32, Int32, Boolean)
   at System.String.Contains(System.String, System.StringComparison)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.Main(System.String[])
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.<Main>(System.String[])
[Info  - 1:10:19 PM] Connection to server got closed. Server will restart.
[Error - 1:10:19 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:19 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:19 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
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.String)
   at System.Globalization.GlobalizationMode+Settings..cctor()
   at System.Globalization.Ordinal.IndexOfOrdinalIgnoreCase(System.ReadOnlySpan`1<Char>, System.ReadOnlySpan`1<Char>)
   at System.Globalization.Ordinal.IndexOf(System.String, System.String, Int32, Int32, Boolean)
   at System.String.Contains(System.String, System.StringComparison)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.Main(System.String[])
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.<Main>(System.String[])
[Info  - 1:10:19 PM] Connection to server got closed. Server will restart.
[Error - 1:10:19 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:19 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:19 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 
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.String)
   at System.Globalization.GlobalizationMode+Settings..cctor()
   at System.Globalization.Ordinal.IndexOfOrdinalIgnoreCase(System.ReadOnlySpan`1<Char>, System.ReadOnlySpan`1<Char>)
   at System.Globalization.Ordinal.IndexOf(System.String, System.String, Int32, Int32, Boolean)
   at System.String.Contains(System.String, System.StringComparison)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0.MoveNext()
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at System.Runtime.CompilerServices.AsyncTaskMethodBuilder.Start[[Microsoft.AspNetCore.Razor.LanguageServer.Program+<Main>d__0, rzls, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60]](<Main>d__0 ByRef)
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.Main(System.String[])
   at Microsoft.AspNetCore.Razor.LanguageServer.Program.<Main>(System.String[])
[Error - 1:10:19 PM] The Razor Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted. See the output for more information.
[Error - 1:10:19 PM] Server initialization failed.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:19 PM] Razor Language Server client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
[Error - 1:10:19 PM] Restarting server failed
  Message: Pending response rejected since connection got disposed
  Code: -32097 

Is is dotnet 9 ? In my dev.nix file only pkgs.dotnet-sdk_8 is available for now.

.NET 9 is available with the following dev.nix settings :tada:

  channel = "unstable";
  packages = [
    pkgs.dotnetCorePackages.sdk_9_0
  ];
1 Like