I am developing a .net core console application where the application interact with SQL server for Linux,located locally, using Entity Framework Core.
When I run the application, I get the error shown below.
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.
Then I added the environment the following export
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
Unhandled exception. System.AggregateException: One or more errors occurred. (Globalization Invariant Mode is not supported.)
---> System.NotSupportedException: Globalization Invariant Mode is not supported.
at Microsoft.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at Microsoft.Data.SqlClient.SqlConnection.OpenAsync(CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenDbConnectionAsync(Boolean errorsExpected, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Storage.RelationalConnection.OpenAsync(CancellationToken cancellationToken, Boolean errorsExpected)
at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func`4 operation, Func`4 verifySucceeded, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at Microsoft.EntityFrameworkCore.Query.ShapedQueryCompilingExpressionVisitor.SingleAsync[TSource](IAsyncEnumerable`1 asyncEnumerable, CancellationToken cancellationToken)
at advance_generics.part.one.Program.CountEmployees(IRepository`1 employeeRepo) in /home/bhaskar/C_Sharp_basics/advance_generics/Program.cs:line 24
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification)
at System.Threading.Tasks.Task`1.get_Result()
at advance_generics.part.one.Program.Main(String[] args) in /home/bhaskar/C_Sharp_basics/advance_generics/Program.cs:line 15
Can any body help me on this?
I did the following regarding ICU
dpkg --status icu-devtools
Package: icu-devtools
Status: install ok installed
Priority: optional
Section: libdevel
Installed-Size: 678
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Multi-Arch: foreign
Source: icu
Version: 66.1-2ubuntu2
Replaces: icu-tools (<< 66.1-1~), libicu-dev (<< 66.1-2ubuntu2)
Depends: libc6 (>= 2.14), libgcc-s1 (>= 3.0), libicu66 (>= 66.1-1~), libstdc++6 (>= 5.2)
Breaks: icu-tools (<< 66.1-1~), libicu-dev (<< 66.1-2ubuntu2)
Description: Development utilities for International Components for Unicode
ICU is a C++ and C library that provides robust and full-featured
Unicode and locale support. This package contains programs used to
manipulate data files found in the ICU sources and is a dependency of
libicu-dev. End users would generally not need to install this package.
Homepage: http://www.icu-project.org
Original-Maintainer: Laszlo Boszormenyi (GCS) <[email protected]>
The problem is not encountered if I run in debug or Run without debug mode I don't get the error