Tekla TSEP packaging: build a .tsep with BatchBuilder

When I sorted the Tekla developer forum by views, the top thread wasn’t about the API at all. It was about .tsep files: 11,700 views, and the installer example next to it adds another 3,900. Packaging is where finished tools get stuck.

My public tools go to Tekla Warehouse as .tsep files. At work, colleagues install the same kind of file. Nobody on either side should have to copy a DLL into a folder by hand, and with a working manifest nobody does.

A .tsep is a renamed ZIP with a Manifest.xml inside

MyPlugin.tsep          (a ZIP archive)
├── Manifest.xml       ← required, TEP 2.0 format
├── MyPlugin.dll       ← your Release build
└── MyPlugin.png       ← optional

You don’t zip it yourself. Tekla ships TeklaExtensionPackage.BatchBuilder.exe in its bin folder. It reads the manifest, collects the files the manifest points to and writes the package. On the other machine, Extensions Manager installs it: Applications & components → gear icon → Manage extensions → Install extension.

Two GUIDs you generate once and never change

<?xml version="1.0" encoding="utf-8"?>
<TEP Version="2.0">  <!-- the root is TEP, not manifest -->
    <!-- UpgradeCode: generated once, identical in every release of this tool -->
    <Product Id="MyPlugin" UpgradeCode="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
             Version="1.1" Language="1033" Name="My Plugin"
             Manufacturer="Your Name" Description="Shown in Extensions Manager."
             Type="Extension">
        <TeklaVersions>
            <TeklaVersion Name="2024.0"/>
            <MinTeklaVersion Name="2024.0"/>
            <MaxTeklaVersion Name="2099.1"/>
        </TeklaVersions>
    </Product>
    <SourcePathVariables>
        <SourcePathVariable Id="TepOutputFolder" Value="%TEPDEFINITIONFILEFOLDER%\output"/>
        <!-- bin\Release, never bin\Debug -->
        <SourcePathVariable Id="SourceBinaries" Value="%TEPDEFINITIONFILEFOLDER%\..\src\MyPlugin\bin\Release\net48"/>
    </SourcePathVariables>
    <TargetPathVariables>
        <PathVariable Id="TargetBinaries" Value="%commonEnvFolder%\extensions\MyPlugin"/>
    </TargetPathVariables>
    <!-- Guid: also generated once, also never changed -->
    <Component Id="MainComponent" Guid="yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy">
        <File Id="CopyBinaries" Source="%SourceBinaries%\*.*" Target="%TargetBinaries%" Recursive="yes"/>
    </Component>
    <Feature Id="MainFeature" Title="MainFeature">
        <ComponentRef ReferenceId="MainComponent"/>
    </Feature>
</TEP>

UpgradeCode is how Extensions Manager knows that 1.1 replaces 1.0. Generate it once with [System.Guid]::NewGuid() in PowerShell, keep it in every release, and never paste it into another tool’s manifest. The component Guid follows the same rule. Copying last year’s manifest into a new tool is the usual way both end up shared by two products.

A new Version is an upgrade. A new UpgradeCode is a different product. Bump Version on every release, and keep AssemblyVersion in the .csproj in step, so the DLL in the extensions folder tells you which release a colleague is running.

Packaged from bin\Debug, it only installs on your PC

In Debug, the app.config patcher writes your own Tekla install path into the exe’s config. That’s what makes F5 work, and it’s exactly what must not travel. Point SourceBinaries at bin\Release. Don’t add Tekla’s DLLs either: they’re compile-time references, and the Tekla on the other machine provides its own at runtime. The 2024 upgrade post explains why that patcher exists at all.

BatchBuilder 2025 rejects the 2024 command

The manifest format didn’t change in 2025. The command line did.

Tekla 2024 and olderTekla 2025 and newer
CommandBatchBuilder.exe -i <manifest> -o <file>BatchBuilder.exe package -i <manifest> -o <folder>
-o isthe .tsep filea folder
File namewhatever you passedalways <Product Id>.<Version>.tsep
# Tekla 2024 and older: -o is the file
& "C:\TeklaStructures\2024.0\bin\TeklaExtensionPackage.BatchBuilder.exe" -i .\Installer\Manifest.xml -o .\dist\MyPlugin.tsep

# Tekla 2025+: verb first, -o is a folder, the file is named for you
& "C:\TeklaStructures\2025.0\bin\TeklaExtensionPackage.BatchBuilder.exe" package -i .\Installer\Manifest.xml -o .\dist
# -> .\dist\MyPlugin.1.1.tsep

Give a 2025 BatchBuilder the old form and it stops with Verb '-i' is not recognized. Add the verb and the next surprise is quieter: a build script that copies .\dist\MyPlugin.tsep afterwards finds nothing, because that file was never written. Read the name from the manifest instead of hard-coding it:

$product = ([xml](Get-Content .\Installer\Manifest.xml)).TEP.Product
$tsep    = Join-Path .\dist ("{0}.{1}.tsep" -f $product.Id, $product.Version)   # what 2025+ actually writes

Smart Select’s icon came from a file name, not the manifest

The first time Smart Select showed up in Applications & components, it had Tekla’s default icon. The fix wasn’t in the manifest. Smart Select is a standalone app, and its catalog entry is a small launcher macro: a .cs file in the macros folder that starts the exe. Tekla pairs that macro with a PNG of the same base name in the same folder. No registration, no manifest entry.

macros\modeling\
├── Smart Select.cs    ← the catalog entry; the file name is the display name
└── Smart Select.png   ← 96×96, same base name, or you get the default icon

Copy the macro source folder with *.* in the manifest and the PNG travels with the .cs. Rename one and not the other, and the icon goes back to the default without a warning.

When the install goes wrong

What you seeWhere to look
The tool works on your PC and nowhere elsePackaged from bin\Debug. Point SourceBinaries at bin\Release.
1.1 installs next to 1.0 instead of replacing itUpgradeCode changed between releases
Verb '-i' is not recognized.2025+ BatchBuilder. Add package, and -o is a folder.
The build script can’t find the .tsep2025+ names it <Id>.<Version>.tsep
Default icon in the catalogThe PNG’s name doesn’t match the .cs

The file is the product. The icon rule went into the Tekla Open API skill after Smart Select’s first package, on the same day as the Release-only rule and the 2025 BatchBuilder command. Your agent can write the manifest. You still check the two GUIDs and the folder it packs. The core course finishes where this post does: a plug-in packaged as a .tsep and installed through Extensions Manager on a clean environment, ready to send to a colleague.

Tekla Open API Course: build real Tekla tools with an AI agent →

Related: Tekla Open API 2024 upgrade: why your exe stops connecting · Debug a Tekla plug-in in Visual Studio · Tekla Open API skill: why AI invents API that doesn’t exist

Tags

Greg Olszewski

Greg Olszewski builds Tekla Open API tools: Grasshopper Tekla Drawing Link, Smart Select, Tekla Lookup. Ten years of C# on Tekla Structures, day job in precast. Now he teaches engineers to build their own.

About Greg ›

COURSE

Build your own Tekla tools

Learn the Tekla Open API in C#, from your first plug-in to tools your team actually uses.

See the course ›