HtmlAgilityPack FileLoadException when targeting NETStandard and Full Framework

Viewed 375

I'm running into a problem with referencing Nuget packages in a NETStandard Library (v2.0) and a project targeting the full framework (v4.7). The full framework project (A) references the NETStandard library (B). The NETStandard library references the HtmlAgilityPack Nuget package (C). I already fixed a part of it because the Nuget packages are not copied into A's binaries folder. Putting

<PropertyGroup>
    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
</PropertyGroup>

already fixed this. Now I get a System.IO.FileLoadException with the exception message:

"HtmlAgilityPack, Version=1.5.5.0, Culture=neutral, PublicKeyToken=null" The located assembly's manifest definition does not match the assembly reference

Anyone can help?

Thanks in advance.

0 Answers
Related