---
Product: Aspose.Slides
Platform: net
Page Type: kb
Canonical URL: https://kb.aspose.org/slides/net/how-to-get-started-slides-dotnet
Last Updated: 2026-04-04
---

# How to Get Started with Aspose.Slides FOSS for .NET

Learn how to install Aspose.Slides.Foss, create a presentation, add shapes and text, apply fills, and save to PPTX using Presentation, SaveFormat, and ShapeType.

`Aspose.Slides.Foss` for .NET is a free, MIT-licensed library for creating and editing
PowerPoint `.pptx` files — no Microsoft Office required.

## Step-by-Step Guide

### Step 1: Install the Package

Install the package (.NET 9.0 or later required):

```bash
dotnet add package Aspose.Slides.Foss
```

Verify the install by building the project:

```bash
dotnet build
```

---

### Step 2: Import Required Namespaces

Add the using directives you need for loading presentations and saving:

```csharp
using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;
```

---

### Step 3: Create a Presentation

Construct a `Presentation` with no arguments to start with one blank slide. Always use
`using` to ensure internal resources are released:

```csharp
using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
Console.WriteLine($"Slides: {prs.Slides.Count}");
prs.Save("new_presentation.pptx", SaveFormat.Pptx);
```

---

### Step 4: Add a Shape with Text

Use `slide.Shapes.AddAutoShape()` to insert a rectangle, then call `AddTextFrame()`
to add text content:

```csharp
using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var slide = prs.Slides[0];
var shape = slide.Shapes.AddAutoShape(ShapeType.Rectangle, 50, 50, 400, 150);
var tf = shape.AddTextFrame("Hello from Aspose.Slides FOSS!");
var fmt = tf.Paragraphs[0].Portions[0].PortionFormat;
fmt.FontHeight = 24;
fmt.FontBold = NullableBool.True;
prs.Save("with_shape.pptx", SaveFormat.Pptx);
```

---

### Step 5: Apply a Fill and Save

Set a solid fill color on the shape before saving:

```csharp
using Aspose.Slides.Foss;
using Aspose.Slides.Foss.Drawing;
using Aspose.Slides.Foss.Export;

using var prs = new Presentation();
var shape = prs.Slides[0].Shapes.AddAutoShape(ShapeType.Rectangle, 100, 100, 400, 200);
shape.FillFormat.FillType = FillType.Solid;
shape.FillFormat.SolidFillColor.Color = Color.FromArgb(255, 70, 130, 180);
shape.AddTextFrame("Styled shape");
prs.Save("styled.pptx", SaveFormat.Pptx);
```

## Common Issues and Fixes

**`TypeLoadException` or `DllNotFoundException`**
Ensure you are targeting .NET 9.0 or later. The library requires .NET 9.0+. Update your
`.csproj` file: `<TargetFramework>net9.0</TargetFramework>`

**`UnsupportedOperationException` when calling certain methods**
Some features (charts, animations, PDF export) are not supported in this release.
Check the API reference for a list of limitations before using advanced features.

**`ObjectDisposedException` after the `using` block**
Do not use a `Presentation` instance outside its `using` block. Access all slides,
shapes, and text frames before the `using` block exits.

**File not saved correctly**
Always pass a `SaveFormat` enum value to `Save()`. The overload `Save(path, SaveFormat.Pptx)`
writes a PPTX-format file.

## Frequently Asked Questions

### Does Aspose.Slides.Foss require Microsoft Office?

No. The library creates and reads `.pptx` files natively in pure C# with no dependency
on Microsoft Office, COM automation, or Windows APIs.

### Which .NET versions are supported?

.NET 9.0 or later. The library runs on Windows, macOS, Linux, and Docker containers.

### Is the library free for commercial use?

Yes. It is released under the MIT License. You may use, modify, and redistribute it for
any purpose, including commercial applications.

### Can I load an existing PPTX file?

Yes. Pass the file path to the `Presentation` constructor:

```csharp
using var prs = new Presentation("existing.pptx");
Console.WriteLine($"Loaded {prs.Slides.Count} slides");
prs.Save("copy.pptx", SaveFormat.Pptx);
```

### Do I need to call Dispose explicitly?

Yes, via the `using` statement. `Presentation` implements `IDisposable` and must be
disposed to release file handles and internal resources.

## See Also

- [FAQ — Aspose.Slides FOSS for .NET](https://kb.aspose.org/slides/net/faq/)
- [How to Create Presentations in .NET](https://kb.aspose.org/slides/net/how-to-create-presentations-dotnet/)
- [How to Add Shapes in .NET](https://kb.aspose.org/slides/net/how-to-add-shapes-dotnet/)
- [Getting Started Docs](https://docs.aspose.org/slides/net/getting-started/)
- [API Reference](https://reference.aspose.org/slides/net/)
- [Aspose.Slides for .NET — Enterprise Knowledge Base](https://kb.aspose.com/slides/net/)