This topic provides information about the following:
- What are NuGet Packages?
- Installing NuGet
- Adding Accusoft NuGet Packages
- Adding Preview NuGet Packages
If you are upgrading from ImageGear v25.x, please see ImageGear Unported Functionality for important differences between the v26.x and v25.x APIs.
What are NuGet Packages?
NuGet is the package manager for the Microsoft development platform that includes .NET. NuGet packages make it easy to add, remove, and update libraries and tools in Visual Studio projects that use the .NET Framework or .NET Core.
To read more about NuGet, please visit nuget.org.
Installing NuGet
The NuGet package manager is installed with Visual Studio, since version 2012.
For command line versions, on Windows/Linux, instruction for installation can be found at this link: https://learn.microsoft.com/en-us/nuget/install-nuget-client-tools
ImageGear .NET NuGet Packages
Package Dependencies are automatically included; so, for example, if you select the Accusoft.ImageGear.Pdf
package, the Accusoft.ImageGear.Core
package is also included.
Package Name | Description | Package Dependencies |
---|---|---|
Accusoft.ImageGear.Core | Includes all functionality to work with common files. Also includes Core ImageGear API, Display API, File format manager, general metadata API, and Metadata dictionary API for the file formats. (BMP, ICO, CUR, CLP, PNG, GIF, TIFF, JFIF, and SVG file formats. CCITT, Deflate, LZW, JPEG compressions. EXIF metadata.) | None |
Accusoft.ImageGear.Pdf | Includes all functionality to work with Adobe PDF and PostScript file formats, and PDF editing API. | Accusoft.ImageGear.Core |
Accusoft.ImageGear.Office | Provides support for Microsoft Office formats. | Accusoft.ImageGear.Core Accusoft.ImageGear.Pdf |
Accusoft.ImageGear.Email | Provides support for .EML and .MSG electronic mail formats. | Accusoft.ImageGear.Core |
Adding Accusoft NuGet Packages
All of our packages can be found at nuget.org, which is the central package repository used by all package authors and consumers. The NuGet Package Manager is configured by default to use nuget.org for packages' sources.
From Command Line (Windows and Linux):
If you have the dotnet CLI installed, run this command from your project’s directory to add ImageGear to your .NET Core project:
dotnet add package Accusoft.ImageGear.Core
For more information on the "dotnet add package" command, see Microsoft’s documentation.
From NuGet Package Manager:
Using the Nuget Package Manager, run this command to add ImageGear to your project:
Install-Package Accusoft.ImageGear.Core
Note: to install PDF features, repeat the above steps with the
Accusoft.ImageGear.Pdf
package.
From Visual Studio:
You can install the NuGet package through Visual Studio 2015 or higher.
- Open the NuGet Package Manager in Visual Studio by right-clicking on the project or solution in the Solution Explorer and choose Manage NuGet packages.
- In the opened window make sure that Package source is set to nuget.org Type "Accusoft.ImageGear.Core" into the search bar to find the package. Check the application name in the right hand panel and press the install button.
- After selecting and installing the required package(s), you should see the newly added assemblies in your application's References folder. If your selected package requires native binaries or additional resources, they will be copied to the application's Output directory after building the project.
- Add using [namespace]; to any C# file where you want to reference these libraries.
To learn more, we also recommend following the official tutorials available at nuget.org: https://docs.nuget.org/consume/package-manager-dialog
Adding Preview NuGet Packages
To access the latest preview NuGet packages, add https://download.accusoft.com/imagegear/net/preview/nuget/index.json
as a NuGet source to your project.
You can do this using one of the following methods:
- Using Visual Studio's Nuget Package Manager. See Microsoft's guide on this here for more information.
- Using the dotnet CLI tool. See Microsoft's guide on this here for more information.
- Using the NuGet CLI tool. See the NuGet CLI documentation here for more information.
- By specifying the source in your project's Nuget.Config file. See Microsoft's guide on this here for more information.
Alternatively, the preview packages can be downloaded. Download the package you wish to preview and all of it's dependencies to a local NuGet source:
Adding Local NuGet Source
To set up a local NuGet source, copy the preview Nuget Packages into the folder containing your Visual Studio project and run the following command:
nuget add Accusoft.ImageGear.Core.26.X.X-preview.XXXX.nupkg -Source ./local-packages
Once the local NuGet source has been created, the ImageGear preview packages can be added to the project with a prerelease tag using the dotnet command
Adding Preview ImageGear NuGet Packages From the Local Source
dotnet add package Accusoft.ImageGear.Core -s ./local-packages --prerelease
Some preview functionality is demonstrated in the documentation, and not yet available in our GitHub samples. See the Release Notes for available preview functionality; see the Developer Guide for code examples and additional information about this preview functionality.