Search found 3 matches

by Tajick
Sun 10 Jul 2022 23:58
Forum: dotConnect for PostgreSQL
Topic: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f
Replies: 4
Views: 38814

Re: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b0

I did not understand your reply because I do not know what Devart Account is and what the provider installation is.
Until now, we used Nuget packages. Are you referring to something different?
by Tajick
Sun 30 May 2021 17:40
Forum: dotConnect for PostgreSQL
Topic: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f
Replies: 4
Views: 38814

Re: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b0

I dug deeper into this issue and found that the project worked fine while it had Devart.Data.PostgreSql 7.7.832 nuget package installed. When I go to the package manager, I do not see versions older than 7.9.912.
Please let me know how I can install 7.7.832.
Thanks.
by Tajick
Fri 28 May 2021 21:59
Forum: dotConnect for PostgreSQL
Topic: Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f
Replies: 4
Views: 38814

Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f

This project has been developed for .NET framework 4.6.1.
Now we have to update it to target 4.7.2 but we are facing a runtime error.
When we create a new PgSqlConnection from a PgSqlConnectionStringBuilder.ConnectionString, it throws:

Code: Select all

System.TypeInitializationException
  HResult=0x80131534
  Message=The type initializer for '  ' threw an exception.
  Source=Devart.Data.PostgreSql
  StackTrace:
   at Devart.Data.PostgreSql.PgSqlConnection..ctor()
   at Devart.Data.PostgreSql.PgSqlConnection..ctor(String connectionString)
   at HttpingUnitTests.UnitTestPersistencyPostgreSql..ctor() in C:\Projects\PostgreSql.cs:line 41

Inner Exception 1:
FileNotFoundException: 
Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. 
The system cannot find the file specified.
We googled and found this error with reference to AngleShapr but nothing with reference to Devart Postgress driver.
We do not use AngleSharp.
We tried to downgrade from the lastest 7.20.1866 all the way back.
We tried to install all kinds of versions of System.Text.Encoding.CodePages, but first of all there is no version 4.1.1 available from Microsoft, and all other versions did not work.
We tried to add a reference to the whichever System.Text.Encoding.CodePages is installed with Devart Postgresql, to no avail.
Any ideas what is missing and why Devart package does not work when the project targets framework 4.7.1?

Thanks,