Reduce the IronPDF Runtimes Folder Size

IronPDF ships native rendering binaries for every supported platform, so the runtimes folder in a default publish can be large. Targeting a single runtime identifier (RID) at publish time trims it down to just the platform you deploy to.

Publish for one RID and turn off a self-contained build:

dotnet publish -r win-x64 --self-contained false
dotnet publish -r win-x64 --self-contained false
SHELL

The -r win-x64 switch keeps only the Windows 64-bit natives instead of every platform's, and --self-contained false leaves the .NET runtime out of the output so it isn't bundled alongside a framework-dependent deployment. Swap win-x64 for the RID that matches your target, such as linux-x64 or osx-arm64.

To make sure the folder is included in your deployment in the first place, see Managing the Runtimes Folder.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 19,533,604 | Version: 2026.6 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPdf
run a sample watch your HTML become a PDF.