Installation
Installation of Aspose.Slides FOSS for .NET
Aspose.Slides FOSS for .NET is distributed as a NuGet package. It targets .NET 9.0 and has no native dependencies: no Microsoft Office or other proprietary runtime required.
Prerequisites
| Requirement | Detail |
|---|---|
| .NET version | .NET 9.0 SDK or later |
| Package manager | NuGet (via dotnet CLI or Visual Studio) |
| Operating system | Windows, macOS, Linux (any platform supported by .NET 9.0) |
| Compiler / build tools | .NET 9.0 SDK (includes the C# compiler) |
1. Install via dotnet CLI (Recommended)
The simplest way to install Aspose.Slides FOSS is from NuGet:
dotnet add package Aspose.Slides.FossNuGet downloads and installs the package along with its dependencies. No post-install configuration is needed.
To install a pinned version for reproducible builds:
dotnet add package Aspose.Slides.Foss --version 26.3.02. Install via Visual Studio
- Right-click your project in Solution Explorer and select Manage NuGet Packages.
- Search for
Aspose.Slides.Foss. - Click Install.
3. Install via Package Manager Console
Install-Package Aspose.Slides.Foss4. Verify the Installation
After installing, verify that the library loads correctly and a Presentation can be created:
using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;
using var prs = new Presentation();
Console.WriteLine("Aspose.Slides FOSS installed successfully");
Console.WriteLine($"Slides in empty presentation: {prs.Slides.Count}");Expected output:
Aspose.Slides FOSS installed successfully
Slides in empty presentation: 1You can also check the installed version with the dotnet CLI:
dotnet list packageThis prints the package name, version, and resolved version.
Quick Start: Create a Presentation with a Shape
The following program creates a new presentation, adds a rectangle with text, and saves it as a .pptx file:
using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;
using var prs = new Presentation();
var slide = prs.Slides[0];
// Add a rectangle shape and set its text
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 400, 150);
shape.AddTextFrame("Hello from Aspose.Slides FOSS!");
prs.Save("hello.pptx", SaveFormat.Pptx);
Console.WriteLine("Saved hello.pptx");Important: Always use Presentation with a using statement or explicitly call Dispose(). This ensures proper cleanup of internal resources.
Platform Notes
Windows, macOS, Linux: The library is identical on all platforms. There are no platform-specific code paths or native extensions.
Docker / serverless: The library works inside .NET Docker images (such as mcr.microsoft.com/dotnet/sdk:9.0) with dotnet add package Aspose.Slides.Foss. No additional system packages are required.
CI/CD: Add dotnet add package Aspose.Slides.Foss to your CI pipeline’s dependency step, or include the package reference in your .csproj file. No additional setup is required.
Additional Resources
- Product Page: Overview, feature summary, and quick start
- License: MIT License details, no API key required
- Developer Guide: Feature guides with code examples
- API Reference: Class and method reference