Including PDFNet References for Windows Apps not using the vsix package

Q: We are using PDFNet Mobile SDK for Windows Universal Apps to develop our application. We have to install the PDFNet Extension into VS 2013, then include this extension into our project. Is there any way for us to add the reference in “Redist” folder appropriately with system architectures (ARM/ x86/ x64)? If yes, we just get appropriate DLLs, commit to our SVN, and the other developers can get code to work without installing the extension.

First, extract the dlls and winmd files from the vsix package. You can do this by simply renaming it so that the extension is .zip instead of .vsix.

Once extracted, the Redist folder contains the dlls and the References folder contains the winmd files.

Put the winmd files together with the dll files, somewhere, inside folders named after the architecture (that is, put the x86 dll and winmd files in a folder called x86, and so on). The folder structure should look like this:

Libs [your own folder name]

---- ARM
-------- pdftron.dll
-------- pdftron.winmd

---- x64
-------- pdftron.dll
-------- pdftron.winmd

---- x86
-------- pdftron.dll
-------- pdftron.winmd

Now, open you project, and then include the winmd file for your current platform configuration.
For example, if your current configuration is for x86, go to the project, right click on references, select Add Reference…
Select browse and find pdftron.winmd in the x86 folder as described above.

Now, save the project file, then open the same project file in notepad (or whatever you fancy). Find the reference to our library in here, it should look something like:

..\..\Lib\Libs\x86\pdftron.winmd

Simply substitute x86 with $(Platform) so that you get:

..\..\Lib\Libs\$(Platform)\pdftron.winmd

Now, if you reopen the project, you should be able to switch platforms and the correct library should be used every time.
A: This is indeed possible to do.