How to Install Aspose.SVG for .NET

Aspose.SVG for .NET is distributed as the Aspose.SVG NuGet package. Installing the package adds the SVG document, rendering, conversion, and vectorization APIs to your .NET project without requiring a desktop graphics application.

NuGet is the recommended installation method because it resolves the package dependencies and makes version updates explicit in your project.

Install Using the .NET CLI

For .NET 10 SDK and later, run this command in the directory that contains your project file:

1dotnet package add Aspose.SVG
2dotnet package add Aspose.SVG --version <version>

For .NET 9 SDK and earlier, use the verb-first command form:

1dotnet add package Aspose.SVG
2dotnet add package Aspose.SVG --version <version>

Omit --version <version> to install the latest available stable package, or include it to select a particular release. The Aspose.SVG NuGet page lists available versions and also provides ready-to-use installation commands. Pinning a version is useful for applications where build reproducibility and controlled upgrades matter.

Install Using Package Manager Console

In Visual Studio, open Tools > NuGet Package Manager > Package Manager Console, and run:

1Install-Package Aspose.SVG

To add a specific version:

1Install-Package Aspose.SVG -Version <version>

Install Using Visual Studio

To install the package without using a command line:

  1. Open your solution in Visual Studio.
  2. In Solution Explorer, right-click the project and select Manage NuGet Packages.
  3. Open the Browse tab and search for Aspose.SVG.
  4. Select the Aspose.SVG package, choose the version required by your project, and click Install.
  5. Accept the requested changes and rebuild the project.

Add a PackageReference Manually

SDK-style .NET projects reference NuGet packages in the project file. If you manage references manually, add a PackageReference and replace <version> with the version your application uses:

1<ItemGroup>
2  <PackageReference Include="Aspose.SVG" Version="<version>" />
3</ItemGroup>

Restore the dependencies after changing the project file:

1dotnet restore

Update the Package

Use the same NuGet interface that your team uses for dependency management. From Package Manager Console, you can update the package with:

1Update-Package Aspose.SVG

For production projects, review the Aspose.SVG for .NET Release Notes before upgrading and test rendering or conversion output that is important to your application.

After Installation

After installing the package, continue with the guides that match your first task: