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.

Several Outlook PST files being merged into one validated Unicode store

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. ErrorCode is 0 on success and a documented number otherwise, with a human-readable ErrorDescription alongside it.
  • Every write is an atomic, reopen-validated rewrite. A crash mid-edit cannot leave a half-written store.
  • Long operations honour a CancellationToken and 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.Default for 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

AssemblyRuntime
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)
Eighteen builds, one per framework. There is no netstandard build — each runtime gets a native assembly instead of a shim. The API is identical across all of them.

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 API
  • Bastion.Pst.Views — bindable read model, queries and item operations
  • Bastion.Pst.Convert — merge, split and convert
  • Bastion.Pst.Authoring — create and edit
  • Bastion.Pst.Import — EML, MSG, MBOX, ICS, VCF and OLM in
  • Bastion.Pst.Export — EML, MSG, MHTML, ICS, VCF and MBOX out
  • Bastion.Pst.Validation — Outlook-style structural validation
  • Bastion.Pst.Repair — rebuild and orphaned-node recovery
  • Bastion.Pst.Diagnostics — activity log, corruption detection, support reports

Full API reference, quick start and 32 worked examples →

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.

Aspose.EmailAspose Pty Ltd · for .NET
Bastion.PstBastion Software Solutions
PST .NETIndependentsoft
Store handling
Read Unicode PST
✔
✔
✔
Read ANSI PSTlegacy pre-2003 stores
✔
✔reads + converts to Unicode
?
Read OST
✔
✔
✔
Create a new PST from scratch
✔
✔
✔
No Outlook or MAPI installedfully managed, server-safe
✔
✔
✔
Password read, set and remove
✔
✔
?
Recovery and integrity
Structural health reportvalidate a store without opening Outlook
—
✔
—
Repair a corrupted store
—
✔
—
Orphaned-node recoveryLost & Found for unreferenced items
—
✔
—
Best-effort read of a damaged file
✔
✔
?
Atomic rewrite on edita crash mid-edit cannot corrupt the file
?
✔
?
Item types
Mail — read and write
✔
✔
✔
Appointments with recurrenceincluding modified and deleted occurrences
✔
✔
?
Contacts, tasks, notes, journal
✔
✔
✔
Distribution lists with members
✔
✔
?
Attachments — add, remove, embedded
✔
✔
✔
Bulk operations
Merge stores
✔
✔
✔
Duplicate removal on mergemessage-id, then content hash
—
✔
—
Selective merge by item type
—
✔
—
Split by size or query
✔
✔
—
Progress and cancellation
✔
✔
?
Conversion
Export MSG, EML, ICS, VCF, MBOX, MHTML
✔
✔
?MSG and EML stated
Import MSG, EML, MBOX, OLM
✔
✔
?MSG stated
ANSI to Unicode conversion
✔
✔
?
Beyond the PST file
SMTP, POP3, IMAP and EWS clients
✔
—
—
Exchange and Gmail integration
✔
—
—
Spam analysis and mail merge
✔
—
—
Redistribute in your own productOEM terms — the tier priced below
✔OEM tier only
✔
✔royalty-free runtime
LicensingUnlimited deployment, redistribution and SaaS permitted
$2,9971 developer · OEM · perpetual, 1 year of updates$999 for Small Business, which forbids redistribution
$9991 developer · OEM$4,99910 developers · OEM$12,999Unlimited developers · site licence
On application1 developer · royalty-free redistribution includedno public price list
✔ supported— not offered? not stated in public documentation

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.

Developer OEM$9991 named developer
  • 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
Team OEM$4,999Up to 10 named developers
  • Everything in Developer OEM
  • $499 per developer
Site OEM$12,999Unlimited developers at one company
  • 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.

Scroll to Top