How to fix: Conversion failure. Could not find ‘Select.Html.dep’.

How to fix: Conversion failure. Could not find ‘Select.Html.dep’.

(Updated in December 2016).

SelectPdf Html To Pdf Converter needs 2 files to work. They are different for the 2 versions that we offer:

Select.Pdf Library for .NET – Commercial Edition

Select.Pdf for .NET requires the .NET assembly Select.Pdf.dll and if the html to converter is used, an additional file called Select.Html.dep. This file, because it does not have a reference in the project, might not get copied to the deployment destination. To fix the problem, copy Select.Html.dep manually. More details about this here:
https://selectpdf.com/docs/Deployment.htm

Security Exception with SelectPdf .net

Conversion failure. Could not find 'Select.Html.dep'.

Description: An unhandled exception occurred during the execution of the current web request

When installing Select.HtmlToPdf from NuGET, the installation copies the dependancy file Select.Html.dep to the bin. When you build, a copy gets placed in the /bin beside Select.HtmlToPdf.dll.

However, when deploying your application, the dependency file does not get copied automatically.

You need to copy Select.Html.dep manually.

See the SelectPdf Html To Pdf Converter for .NET deployment documentation.

Could not load

是因为17.2的dll文件,复制了19.2的Select.Tools.dep文件和Select.Html.dep文件。确定文件的差异,可以通过HashCheck确定对应文件的 sha-256

=== Pre-bind state information ===
LOG: DisplayName = Select.Pdf
(Partial)
WRN: Partial binding information was supplied for an assembly:
WRN: Assembly Name: Select.Pdf | Domain ID: 2
WRN: A partial bind occurs when only part of the assembly display name is provided.
WRN: This might result in the binder loading an incorrect assembly.
WRN: It is recommended to provide a fully specified textual identity for the assembly,
WRN: that consists of the simple name, version, culture, and public key token.
WRN: See whitepaper http://go.microsoft.com/fwlink/?LinkId=109270 for more information and common solutions to this issue.
LOG: Appbase = file:///C:/Users/clu/Downloads/LISA 7 Test/IN_LS_BOF_6_0_v6/IN_LS_BOF_6_0/
LOG: Initial PrivatePath = C:UserscluDownloadsLISA 7 TestIN_LS_BOF_6_0_v6IN_LS_BOF_6_0in
LOG: Dynamic Base = C:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Files est202106170012008f663
LOG: Cache Base = C:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Files est202106170012008f663
LOG: AppName = 7e035232
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:UserscluDownloadsChuck 7 TestIN_LS_BOF_6_0_v6IN_LS_BOF_6_0web.config
LOG: Using host configuration file: C:WindowsMicrosoft.NETFramework64v4.0.30319aspnet.config
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/test20210617001/2008f663/7e035232/Select.Pdf.DLL.
LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/test20210617001/2008f663/7e035232/Select.Pdf/Select.Pdf.DLL.
LOG: Attempting download of new URL file:///C:/Users/clu/Downloads/Chuck 7 Test/IN_LS_BOF_6_0_v6/IN_LS_BOF_6_0/bin/Select.Pdf.DLL.
LOG: Assembly download was successful. Attempting setup of file: C:UserscluDownloadsChuck 7 TestIN_LS_BOF_6_0_v6IN_LS_BOF_6_0inSelect.Pdf.dll
LOG: Entering download cache setup phase.
LOG: Assembly Name is: Select.Pdf, Version=17.2.0.0, Culture=neutral, PublicKeyToken=e0ae9f6e27a97018
LOG: A partially-specified assembly bind succeeded from the application directory. Need to re-apply policy.
LOG: Using application configuration file: C:UserscluDownloadsLISA 7 TestIN_LS_BOF_6_0_v6IN_LS_BOF_6_0web.config
LOG: Using host configuration file: C:WindowsMicrosoft.NETFramework64v4.0.30319aspnet.config
LOG: Using machine configuration file from C:WindowsMicrosoft.NETFramework64v4.0.30319configmachine.config.
LOG: Post-policy reference: Select.Pdf, Version=17.2.0.0, Culture=neutral, PublicKeyToken=e0ae9f6e27a97018
LOG: GAC Lookup was unsuccessful.
ERR: Setup failed with hr = 0x80131043.
ERR: Failed to complete setup of assembly (hr = 0x80131043). Probing terminated.

原文地址:https://www.cnblogs.com/chucklu/p/14858638.html