Coming soon
Developer library · .NET · C# and VB.NET
Bastion Pst Sdk (Bastion.Pst)
A fully managed .NET library for Outlook .pst and .ost files — read, author, merge, split, convert, repair and validate. Without Outlook, without MAPI, and without a single native dependency.
18
framework builds, .NET Framework 4.6 through .NET 10 — one native assembly each, no netstandard shim
2003→365
every desktop Outlook from 2003 onwards opens the Unicode PST files it writes
0
native dependencies. 100% managed code, clean-room [MS-PST] implementation
9
namespaces covering read, views, convert, author, import, export, validation, repair and diagnostics
Three years of archives, merged in one call
Duplicates removed, damaged sources repaired on the way in, empty folders pruned, and a plain-language log for your user. Every operation returns a result object — the library never throws into your application.
VB.NET
Imports Bastion.Pst
Imports Bastion.Pst.Convert
Imports Bastion.Pst.Diagnostics
Dim diag As New clsDiagnostics With {
.CreateUserLog = True,
.ScanSourcesOnOpen = True,
.SupportContact = "support@yourapp.com"}
Dim report = clsStoreMerger.Merge(
{"2019.pst", "2020.pst", "2021.pst"}, "combined.pst",
dedup:=New clsDedup(), diag:=diag, overwrite:=True,
layout:=enmMergeLayout.Unified, rootName:="All Mail 2019-2021",
pruneEmpty:=True)
If report.ErrorCode <> enmErrorCode.Ok Then
Console.WriteLine(report.ToString()) ' never an exception
Return
End If
Console.WriteLine($"{report.DuplicatesRemoved} duplicates removed")
C#
using Bastion.Pst;
using Bastion.Pst.Convert;
using Bastion.Pst.Diagnostics;
var diag = new clsDiagnostics {
CreateUserLog = true,
ScanSourcesOnOpen = true,
SupportContact = "support@yourapp.com"
};
var report = clsStoreMerger.Merge(
new[] { "2019.pst", "2020.pst", "2021.pst" }, "combined.pst",
dedup: new clsDedup(), diag: diag, overwrite: true,
layout: enmMergeLayout.Unified, rootName: "All Mail 2019-2021",
pruneEmpty: true);
if (report.ErrorCode != enmErrorCode.Ok)
{
Console.WriteLine(report.ToString()); // never an exception
return;
}
Console.WriteLine($"{report.DuplicatesRemoved} duplicates removed");
Everything a PST needs, in one assembly
One reference, one DLL. Drop it beside your executable and ship.
Read anything
Messages, folders, recipients, attachments and properties from any PST or OST — ANSI or Unicode, of any size. A streaming engine keeps memory bounded on multi-gigabyte stores.
Merge and de-duplicate
Combine any number of stores, stacked or unified. Optional duplicate removal, item-type filtering, empty-folder pruning and automatic removal of blank junk messages.
Split
Break a large store into size-limited volumes, or by an arbitrary predicate — everything matching a subject, a date range, a sender.
Convert and interchange
ANSI to Unicode conversion. Export to EML, MSG, MHTML, ICS, VCF and MBOX; import EML, MSG, MBOX, ICS, VCF and Outlook-for-Mac OLM archives back in.
Repair
Rebuild a readable-but-malformed store into a fresh, structurally canonical Unicode PST, with orphaned nodes recovered rather than discarded.
Validate
Strict Outlook-style validation that catches what Outlook would reject — before your user ever mounts the file. Folder counts verified against reality.
Designed for shipping software
Written for products that go out of the door and have to keep working.
The library never throws into your application
- Every operation returns a result object.
ErrorCodeis0on success and a documented number otherwise, with a human-readableErrorDescriptionalongside it. - Every write is an atomic, reopen-validated rewrite. A crash mid-edit cannot leave a half-written store.
- Long operations honour a
CancellationTokenand stop cleanly, leaving nothing partial behind. - A source store is never written to.
- An ANSI → Unicode safety gate refuses to silently upgrade a legacy store without your explicit consent.
- Subscribe once to
clsPstEvents.Defaultfor opens, read progress, folder selections, closes and errors. No polling, no callback threaded through every call. - Support reports carry structural metadata only — never message content.
Reference the build that matches your project
| Assembly | Runtime |
|---|---|
lib/net46 … lib/net481 | .NET Framework 4.6 – 4.8.1 |
lib/netcoreapp2.0 … lib/netcoreapp3.1 | .NET Core 2.0 – 3.1 |
lib/net5.0 … lib/net10.0 | .NET 5, 6, 7, 8 (LTS), 9, 10 (LTS) |
On .NET Core and .NET 5+, also add Microsoft’s System.Text.Encoding.CodePages package for correct ANSI→Unicode transcoding. The eight .NET Framework builds need nothing beyond the framework.
The files it writes open in Outlook
Bastion Pst Sdk always writes the Unicode PST format introduced with Outlook 2003. Every desktop Outlook release from 2003 onwards — 2003, 2007, 2010, 2013, 2016, 2019, 2021, 2024 and Microsoft 365 — opens its output cleanly.
Outlook 2002/XP and earlier understand only the legacy ANSI format and cannot read a Unicode PST, so there is no ANSI write mode. The reverse works: the library reads those old ANSI PST and OST files happily, and converts them to Unicode on request.
Author Outlook items from code
Mail, appointments — including recurring series with deleted-occurrence exceptions — contacts, tasks, notes, journal entries and distribution lists, through a fluent builder. Create, rename, move and delete folders; move and edit items; strip attachments. A batching session commits many edits in one atomic write.
Bastion.Pst.Authoring
Show a mailbox in your own application
A bindable read model per section — mail, contacts, appointments, tasks, notes and RSS — giving flat rows a grid, card view or scheduler binds to directly. Folder classification, Outlook’s hidden address-book caches, contact groups with their members decoded, and duplicate-contact folding are all handled once, inside the library. A query filters items before they are opened: the difference between reading a few hundred and reading a hundred thousand.
Bastion.Pst.Views
Also a practical PowerShell library
Because it is an ordinary managed assembly with no native parts, it loads straight into PowerShell — useful for auditing a directory of archives, exporting a mailbox, or merging a decade of PST files from a scheduled job. Load libnet48 from Windows PowerShell 5.1 and libnet8.0 from PowerShell 7+. The distribution ships a ready-made module and fourteen worked tasks.
Nine namespaces
Bastion.Pst.Messaging— the read APIBastion.Pst.Views— bindable read model, queries and item operationsBastion.Pst.Convert— merge, split and convertBastion.Pst.Authoring— create and editBastion.Pst.Import— EML, MSG, MBOX, ICS, VCF and OLM inBastion.Pst.Export— EML, MSG, MHTML, ICS, VCF and MBOX outBastion.Pst.Validation— Outlook-style structural validationBastion.Pst.Repair— rebuild and orphaned-node recoveryBastion.Pst.Diagnostics— activity log, corruption detection, support reports
How it compares
Capability matrix for .NET Outlook PST libraries, compiled July 2026 from each vendor’s published documentation. A ? means the capability was not stated either way — it is not a claim that the product lacks it.
OEM licensing
One licence type, priced for commercial software teams. Every Bastion Pst Sdk licence is an OEM licence: build it into your product and ship that product to as many customers as you like, on as many machines as they like.
- Royalty-free redistribution inside your own applications
- Desktop, server, cloud and SaaS deployment — no per-server or per-instance fees
- Perpetual licence with 12 months of updates; renewals at 35% of list
- Every build, .NET Framework to .NET 10, and samples in C# and VB.NET
- Everything in Developer OEM
- $499 per developer
- Everything in Developer OEM
- No developer count to track as the team grows
- Source-code escrow available, priced on request
Launch prices in US dollars. Final pricing is confirmed at release.
Try it properly first
A thirty-day evaluation of the complete component. Every feature is included. The evaluation build accepts input PST and OST files up to 100 MB, and splits merged or stacked output into 500 MB volumes rather than the 50 GB a licensed build uses.
Because the evaluation includes every feature, sales are final, and accepting the terms and conditions of sale is part of completing a purchase. The one exception: report a serious defect and, if we cannot fix it and release an update within thirty days, we refund you in full.
Need more than the component? Custom development and integration work built on it is available, remotely or on site — talk to us.
Try it against your own PST files
The hardest stores are the ones already broken. Send us the shape of your problem and we will tell you plainly whether the library solves it.