Avoiding Reference Errors When Installing APDFL with NuGet
Estimated Reading Time: 3 MinutesOverview
When installing APDFL using NuGet, reference errors can occur if the incorrect package type is used or if different package types are combined in the same project. This document explains the differences between the available APDFL NuGet packages and provides guidance on how to install them correctly to avoid common issues.
APDFL NuGet Package Types
There are two APDFL NuGet package types available. They are functionally the same but differ in how licensing is handled and how they should be installed and used.
1. License Managed NuGet Package
- Available on nuget.org
- Package name includes “.LM.”
- Requires a license file or activation key at runtime
- Suitable when license management is required and when regular updates through NuGet are preferred.
2. Non License Managed NuGet Package
- Available on the FTP site
- Does not require a license file to run
- Intended for environments where license management is not needed
- Must be downloaded and referenced manually
- If this package is needed through the portal, please contact Datalogics Support to request that it be made available.
Common Causes of Reference Errors
- License managed and non license managed packages are both added to the same project
- A project is switched from one package type to another without fully removing the original package
- Components from different package types are combined in the same project by mistake
While it is technically possible for both package types to exist in a project, using them together is considered a usage issue and can result in build or runtime errors.
Best Practices to Avoid Errors
- Choose one package type and use it consistently within a project
- Do not mix license managed and non license managed packages
- When switching package types, completely remove the old package and clean all references before installing the new one
- Verify package names to ensure the correct package type is being used
Version Naming Clarification
Some APDFL patch updates are released together with a later NuGet package rather than as a separate NuGet package with the patch name. Because of this, you may not see a NuGet package that exactly matches the patch naming.
In these cases:
- The license managed NuGet package is available on nuget.org
- The non license managed NuGet package is available on the FTP site for download
- Differences in package naming are expected and do not indicate differences in functionality
Summary
Most NuGet related reference errors are caused by mixing package types or using an unintended package for the project configuration. Following the guidance in this document will help ensure a smooth installation and avoid common reference issues.
How to Get Additional Help
For further assistance or if you encounter any issues while implementing PDF restrictions using the APDFL libraries, you can reach out for support. You can send an email to our technical support team at tech_support@datalogics.com.
Have questions while using APDFL? Fetch the answers quickly using our AI assistant Scout, available for any language. Scout also opens access to our MCP server, connecting APDFL with your favorite AI tools for faster and easier coding.