Failed to load file or assembly. Anglesharp and System.Text.Encoding.CodePages

0

Full error:

Error during info retrieval occurred... System.IO.FileLoadException: 

Could not load file or assembly 'System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at AngleSharp.Browser.EncodingMetaHandler..ctor()
   at AngleSharp.Configuration..ctor(IEnumerable`1 services)
   at AngleSharp.BrowsingContext.NewFrom[TService](TService instance)
   at AngleSharp.Html.Parser.HtmlParser..ctor()
   at AmazonCreator.APIs.FakeIt..ctor()

=== Pre-bind state information ===
LOG: DisplayName = System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
 (Fully-specified)
LOG: Appbase = file:///C:/Users/kingk/OneDrive/Desktop/LPB/
LOG: Initial PrivatePath = NULL
Calling assembly : AngleSharp, Version=0.12.1.0, Culture=neutral, PublicKeyToken=e83494dcdc6d31ea.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v4.0.30319\config\machine.config.
LOG: Post-policy reference: System.Text.Encoding.CodePages, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
LOG: Attempting download of new URL file:///C:/Users/kingk/OneDrive/Desktop/LPB/System.Text.Encoding.CodePages.DLL.
WRN: Comparing the assembly name resulted in the mismatch: Minor Version
ERR: Failed to complete setup of assembly (hr = 0x80131040). Probing terminated.

I have already tried changing my default app pool to 32-bit enabled.

I have already tried tools>options>Projects&Solutions>WebProjects>Enabling 64 bit version of ILS Express

I have already tried re-installing codepages and anglesharp

On all other questions that are the same as mine, the solutions haven't worked!

Here is where the code throws the error: IHtmlDocument doc = new HtmlParser().ParseDocument(htmlResponse);

Anglesharp: 0.12.1.0 System.Text.Encoding.CodePages: 4.1.1.0

IMPORTANT NOTE: The software runs completely fine on my machine however on any other machine I get the error above

c#
dll
reference
asked on Stack Overflow Jul 14, 2019 by Lunabooster

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0