How To Include AbcPDF XULRunner Folder As Linked Item In Visual Studio?

I was working on some PDF generation for a customer that used AbcPDF in their ASP.NET MVC website.

The work was to move from basic MVC views written especially for PDF rendering, to reusing the same MVC views we send to the HTML browsers.

With more sophisticated markup, came more CSS styling. The default IE engine seemed to lack a few CSS features we used a lot (example, the :not() CSS selector). So, we decided to use the Gecko engine.

The rendering was much better, with a single exception, that the option to choose media type (screen, print) could not be switched. It had to always be print. I guess a few other browser settings were not applicable as well.


All I needed to do, to add Gecko, was to install the ABCpdf.ABCGecko NuGet package. Something like:

<code class="PowerShell">Install-Package ABCpdf.ABCGecko -Version

It took quite a while, and at the end, it showed me a message, saying that I need to manually (hate that word) copy a folder called XULRunner21_0 to the MVC project’s bin folder.

The Firefox / Gecko XULRunner Folder

The folder is needed for AbcPDF to connect to Firefox 21 (what’s used in v9, I guess it’s 38 in v10).

The folder, which has so many files and subfolders, was present in the root of my ASP.NET MVC project.

I didn’t want to have to commit this ~40 MB folder to our source control. The customer used NuGet package restore and didn’t want to keep binary files in source.

I know different people and different projects handle dependencies differently, and it can get interesting, but in my case, it was not wanted.

So, I modified the web project .csproj file, and added the following after a PostBuild <Task> in the file:

<code class="XML"><ItemGroup>

This made the folder show up in the project web project root in Visual Studio, and get copied to the bin folder, but the actual files were pulled from the package folder, not left in the website root itself.

The approach in general is very useful for adding an entire folder as a linked item in Visual Studio. I hope that little trick has helped!

Share With Friends:

How did I learn that?

As a bonus for coming here, I'm giving away a free newsletter for web developers that you can sign up for from here.

It's not an anything-and-everything link list. It's thoughtfully collected picks of articles and tools, that focus on Angular 2+, ASP.NET (4.x/MVC5 and Core), and other fullstack developer goodies.

Take it for a test ride, and you may unsubscribe any time.

You might also want to support me by checking these out [Thanks]:

  • Daryl

    Hi there, is there a way to do this with the print-hook.dll, abcpdf10.dll and 3Dglue.dll? We’re doing our deployment similar to the customer you talked about in your article. When we installed the abcpdf10 NuGet package, it put dlls at the root of our project. I’d like to get around having to commit these to source control if at all possible since we restore packages during our build process.

  • Pingback: good seedbox()

  • Pingback: TS TV Escorts from London()

  • Pingback: DMPK Studies()

  • Pingback: TS Escorts()

  • Pingback: online wiet bestellen()

  • Bob Conroy

    @Daryl assuming you figured it out but just recently did something similar with the following



  • Bob Conroy

    While this approach works, it causes problems on the build server.
    On every development build, it wants to copy the 2200 xul runner files from the build server to the server and in our case that doubles our build time.

    I’ve tried a few things like


    Trying to exclude our custom Configurations ‘SiteNameRelease’ but it still makes it way through the server build.

  • Pingback: roofing contractor()