How to Fix Select.HtmlToPdf Assembly Load Errors on SharePoint 2026
Resolve Select.HtmlToPdf load failures in SharePoint by matching frameworks, deploying companion files, checking bindings, and fixing architecture issues.
Direct answer: A Select.HtmlToPdf load error on SharePoint usually means the worker process found the wrong assembly, cannot find a required companion file, is running an incompatible framework or CPU architecture, or is missing Blink binaries. Capture the full exception first, then match the SelectPdf package to the farm’s .NET target, remove duplicate DLLs, deploy Select.Pdf.dll with Select.Html.dep and Select.Tools.dep, verify x86/x64 and Blink requirements, add only a narrowly justified binding redirect, recycle the affected web application, and confirm the loader path with Fusion logs.
1. Capture the complete exception before changing the farm
Record the complete exception and the process that emitted it. SharePoint can report several different failures with similar wording.
- Requested identity: simple name, version, culture, and public key token.
- Exception type:
FileNotFoundException,FileLoadException,BadImageFormatException, or another inner exception. - Process and web application: the IIS application pool, server, and SharePoint web application.
- Deployment location: the effective web application’s
bindirectory, GAC entries, and any SharePoint solution deployment path.
A missing file generally produces “could not load file or assembly.” “The manifest definition does not match the assembly reference” indicates an identity or version mismatch. BadImageFormatException usually indicates an architecture or incompatible binary problem. The .NET Framework caches binding failures, so a request can fail immediately after you correct a file until the worker process is recycled. See Microsoft’s assembly-resolution rules.
2. Identify the framework and SelectPdf package variant
Do not choose a package by DLL name alone. Confirm the target framework of the SharePoint solution and the CLR loaded by the IIS worker process.
| Application target | Package direction | What to verify |
|---|---|---|
| .NET Framework through 4.5 | Select.HtmlToPdf package line |
Package target and the assembly’s exact version |
| Newer .NET Framework targets | Use the vendor’s compatible distribution and dependencies | Framework-specific dependencies and CLR 4 process |
| .NET 5–10 or other modern .NET | Select.HtmlToPdf.NetCore |
Runtime identifier, native files, and hosting model |
The NuGet listing for Select.HtmlToPdf reports version 26.3.0 and a target through .NET Framework 4.5. It directs newer .NET Framework and modern .NET applications to Select.HtmlToPdf.NetCore. SelectPdf also publishes separate CLR 2.0, CLR 4.0, and modern .NET distributions. Treat the package metadata and the DLL manifest as authoritative for your build.
Inspect the deployed assembly identity
powershell
$bin = "C:\inetpub\wwwroot\wss\VirtualDirectories\443\bin"
$dll = Join-Path $bin "Select.Pdf.dll"
if (-not (Test-Path $dll)) { throw "Missing $dll" }
$asm = [System.Reflection.AssemblyName]::GetAssemblyName($dll)
[pscustomobject]@{
Path = $dll
FullName = $asm.FullName
Processor = (Get-Item $dll).VersionInfo.FileVersion
FileSize = (Get-Item $dll).Length
}
Run this on every server that can host the web application. Compare the output with the identity named in the exception. A file version shown by Explorer is not a substitute for the assembly’s full name.
3. Remove stale and duplicate copies
- Stop deployment changes while you inventory the farm.
- Search each effective web application’s
bindirectory forSelect.Pdf.dll,Select.HtmlToPdf.dll, and related files. - Check the GAC and SharePoint solution deployment directories for older strong-named copies.
- Keep one deliberate version in the location your application is configured to probe.
- Redeploy the same file set to every front-end and application server.
powershell
Get-ChildItem -Path "C:\inetpub\wwwroot\wss" -Filter "Select*.dll" -Recurse -ErrorAction SilentlyContinue |
Select-Object FullName, Length, LastWriteTime,
@{Name="AssemblyName";Expression={try {[System.Reflection.AssemblyName]::GetAssemblyName($_.FullName).FullName} catch {"unmanaged-or-invalid"}}}
A strong-named assembly in the GAC can win resolution over a file you expected to load from bin. Remove or update stale copies through your normal SharePoint deployment process; do not delete a shared assembly blindly on a production farm.
4. Deploy the required companion files
SelectPdf requires more than the primary managed DLL. Place these files beside the application assembly in the effective application bin directory:
Select.Pdf.dllSelect.Html.dep(used by the HTML-to-PDF converter)Select.Tools.dep(used by PDF-to-text and PDF-to-image features)
For .NET Framework 4.6.1/4.7.2 and .NET Core targets, install the dependencies listed by SelectPdf, which can include Newtonsoft.Json, System.Buffers, System.Numerics.Vectors, and System.Threading.Tasks.Extensions. Follow the vendor’s installation documentation for the exact package graph.
powershell
$required = @("Select.Pdf.dll", "Select.Html.dep", "Select.Tools.dep")
$required | ForEach-Object {
$path = Join-Path $bin $_
[pscustomobject]@{ File = $_; Present = Test-Path $path; Path = $path }
}
5. Check CPU architecture and native rendering files
A 32-bit native dependency loaded by a 64-bit IIS worker process (or the reverse) can produce BadImageFormatException. Check the application pool’s Enable 32-Bit Applications setting, the selected SelectPdf build, and every native dependency as one combination. Make the setting consistent across servers.
If the converter uses the Blink engine, install the matching Chromium/Blink package or copy the required Chromium folder into the application bin directory. SelectPdf states that Blink binaries are required for that engine. A managed DLL can load successfully while the first conversion fails because the native browser files are absent.
6. Add a narrow binding redirect only after confirming the identity
Binding redirects belong in the SharePoint web application’s configuration. Use the exact assembly name, public key token, and version range from the exception and deployed DLL. Do not copy example versions into production.
xml
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Select.Pdf"
publicKeyToken="REPLACE_WITH_MANIFEST_TOKEN"
culture="neutral" />
<bindingRedirect oldVersion="REPLACE_WITH_OBSERVED_RANGE"
newVersion="REPLACE_WITH_DEPLOYED_VERSION" />
</dependentAssembly>
</assemblyBinding>
</runtime>
</configuration>
Microsoft documents the urn:schemas-microsoft-com:asm.v1 namespace and the <bindingRedirect> form in Redirecting Assembly Versions. A redirect cannot repair a missing companion file, incompatible architecture, or wrong package family. Avoid editing machine.config for a site-specific issue because machine-level redirects affect every application on the server.
7. Use binding logs, recycle, and retest safely
- Enable Fusion binding logs (or an equivalent loader diagnostic) for the affected server.
- Reproduce one request and capture the log entry.
- Confirm the configuration file, probing paths, codebase, GAC result, and the file that was ultimately selected.
- Correct the deployment or redirect based on that evidence.
- Disable verbose binding logs after diagnosis.
- Recycle the affected SharePoint web application application pool, then retest with a fresh request.
Recycling matters because failed assembly binds are cached in the process. Coordinate the recycle with farm operations and repeat the test on each server that can receive traffic.
8. Troubleshooting matrix
| Symptom | Likely cause | Fix |
|---|---|---|
| Could not load file or assembly; file not found | DLL or dependency is absent from the effective bin |
Deploy the complete file set and verify the probing path with Fusion logs |
| Manifest definition does not match | Referenced version differs from the loaded version | Remove duplicates or add a redirect for the exact identity and range |
BadImageFormatException |
x86/x64 mismatch or incompatible native binary | Align the app-pool bitness, package variant, and native files |
| Type or method not found | Mixed SelectPdf versions or transitive dependency mismatch | Redeploy one coherent package graph and clear stale copies |
| HTML conversion starts but Blink fails | Chromium/Blink folder or matching package is missing | Install the Blink package and copy its files beside the application |
| Works on one server only | Farm nodes have different binaries, config, or architecture | Compare hashes, assembly identities, app-pool settings, and web.config on every node |
| Error persists immediately after a fix | Worker process cached the failed bind | Recycle the affected app pool and retest |
9. A repeatable deployment checklist
- ☐ Full exception, inner exception, server, and process recorded
- ☐ Framework and package variant match
- ☐ One intentional SelectPdf version is deployed
- ☐
Select.Pdf.dll,Select.Html.dep, andSelect.Tools.depare beside the app - ☐ Required NuGet dependencies are present for the target framework
- ☐ App-pool bitness matches the converter and native files
- ☐ Blink/Chromium files are present when Blink is enabled
- ☐ Binding redirect uses the exact manifest identity
- ☐ Fusion log confirms the selected path
- ☐ Every farm server has the same deployment and configuration
- ☐ App pool recycled after changes
10. Performance, reliability, and cost considerations
Assembly resolution happens during process startup or the first use, so duplicate probing paths and repeated failed binds add latency and make failures harder to diagnose. Keep the deployment deterministic, avoid machine-wide redirects, and warm one controlled conversion after deployment. Native browser rendering can consume substantial CPU and memory; monitor the SharePoint worker process and set conversion concurrency according to the farm’s capacity.
For production reliability, deploy through a repeatable package, verify file hashes on each node, test both cold and warm conversions, and retain the exact assembly identities used in a release record. SelectPdf’s free Community Edition is reported by NuGet as limited to five pages; confirm licensing and limits with the vendor before choosing it for production workloads.
11. Or skip the browser setup
If your goal is a clean image or PDF of a SharePoint page rather than maintaining an in-process HTML converter, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns PNG, JPEG, WebP, or PDF. Cookie and consent banners, newsletter popups, and chat widgets are removed before capture; bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server lets Claude, Cursor, and other MCP clients call take_screenshot, get_page_info, and capture_pdf.
See the ScreenshotNeo API documentation for all options.
cURL
bash
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js
javascript
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
ScreenshotNeo also supports full-page captures with lazy images, CSS element capture, device presets, custom viewports, retina scale, PDF paper and margin controls, custom CSS and JavaScript, waits, request blocking, headers, cookies, user agents, authorization, timezone, geolocation, caching, signed links, async jobs, bulk capture, usage reporting, and HTML/CSS-to-image. Free usage is 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
12. FAQ
Should I install both Select.HtmlToPdf and Select.HtmlToPdf.NetCore?
No. Choose the package family that matches the application’s target framework and runtime. Mixing families commonly creates incompatible dependencies.
Can a binding redirect fix a missing Select.Html.dep file?
No. A redirect changes assembly version resolution. It cannot create a missing dependency or native browser folder.
Where should the .dep files go?
Place Select.Html.dep and Select.Tools.dep beside Select.Pdf.dll in the effective SharePoint application bin directory.
Why does the error return after recycling another server?
Requests may be reaching a farm node with a different deployment. Compare files, configuration, app-pool architecture, and package versions on every node.
Is there one universal SharePoint 2026 redirect?
No. The correct assembly identity, old-version range, and new version must come from the failing farm’s exception and deployed DLL manifest.


