Skip to content

Deployment Guide

There is nothing to deploy besides your application itself, except Oracle Instant Client if you use ThinkGeo.Oracle, and fontconfig on a Linux server that draws images. Copy your build or publish output to the server, and it runs: the build signs your license into your assembly, so there is no runtime license to install or activate on the server, and trimming, single-file publishing and ReadyToRun keep it.

Windows

ThinkGeo adds nothing to what .NET itself needs on the server. The packages that use native libraries (GDAL, CAD, File Geodatabase, Oracle, nautical charts) carry their own Visual C++ runtime, so the Visual C++ Redistributable is not needed either.

Oracle

ThinkGeo.Oracle needs Oracle Instant Client on every machine that runs your application. It is not in the ThinkGeo packages, because Oracle's license lets it be passed on only to users bound by Oracle's terms, so you get it from Oracle:

  1. Download Instant Client for Microsoft Windows (x64), the Basic package, from Oracle. You accept Oracle's license there.
  2. Unzip it into a folder, for example C:\oracle\instantclient_23_26.
  3. Add that folder to PATH, then start your application.

ThinkGeo 15.1 is tested with Instant Client 23.26. Without it, opening an Oracle source fails with Can't load requested DLL: ...\gdalplugins\ogr_OCI.dll 126: The specified module could not be found.

Linux

Serving vector tiles, as the Web Maps Quick Start does, needs nothing installed: the browser draws them. Drawing on the server does need one library. PNG tiles from classic layers, printing and PDF export draw with SkiaSharp, which needs fontconfig, and slim server and container images, Microsoft's .NET images included, do not have it. The first drawing then fails with:

System.DllNotFoundException: Unable to load shared library 'libSkiaSharp' or one of its dependencies.
libfontconfig.so.1: cannot open shared object file: No such file or directory

Install it on the server or in your Dockerfile:

apt-get update
apt-get install -y --no-install-recommends libfontconfig1

This also installs FreeType and the DejaVu fonts that labels are drawn with.

Docker

This Dockerfile publishes the Web Maps Quick Start WebAPI project and runs it on Microsoft's ASP.NET Core image with fontconfig added. Save it as Dockerfile in the project folder, next to WebApiSample.csproj:

# Build and publish the project with the .NET SDK image.
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish -c Release -o /app/publish /p:UseAppHost=false

# Run it on the ASP.NET Core image, which is Ubuntu.
FROM mcr.microsoft.com/dotnet/aspnet:10.0
# fontconfig, for drawing on the server (PNG tiles, printing, PDF); vector tiles alone do not need it.
# It brings FreeType and the DejaVu fonts too.
USER root
RUN apt-get update && apt-get install -y --no-install-recommends libfontconfig1 && rm -rf /var/lib/apt/lists/*
USER app
WORKDIR /app
COPY --from=build /app/publish .
EXPOSE 8080
ENTRYPOINT ["dotnet", "WebApiSample.dll"]

Next to it, a .dockerignore keeps the build output of your machine out of the image:

bin/
obj/

Build the image and start a container from the project folder, then open http://localhost:8080:

docker build -t webapisample .
docker run -p 8080:8080 webapisample

The project is built inside the container, where your license key file is not, so that build runs on the 30-day trial. To build with your key, pass it to the build as a secret, as Build Servers, CI and Containers shows.

Blazor deployment

For a Blazor Web App, use the same build and runtime stages, replacing WebApiSample.dll with your application's assembly name. Copy the complete publish output, including wwwroot and any application data files. For the Blazor Quick Start project, the entry point is:

ENTRYPOINT ["dotnet", "BlazorSample.dll"]

The fontconfig requirement depends on where drawing occurs. A VectorTileOverlay that serves feature data for rendering in the browser does not require fontconfig on the server. Classic LayerOverlay rendering on the server does require it, together with suitable fonts for labels. The installation above supplies DejaVu fonts; install any additional fonts your application uses.

Keep the Blazor Web App's interactive render-mode configuration when publishing. Verify the published application's static assets, data loading, and map interaction in the browser, rather than checking only that the home page returns successfully. For an Interactive Server app behind a reverse proxy, follow ASP.NET Core's Blazor hosting guidance for the interactive connection and HTTPS configuration.

CAD drawings

To read DWG and DXF files with ThinkGeo.Cad on Linux x64, add the ThinkGeo.Cad.Dependency.Linux package to your project next to ThinkGeo.Cad. It holds the Open Design Alliance libraries for Linux x64 and runs on any distribution that .NET 8 supports. Text in drawings is drawn with the server's fonts, so install the fonts your drawings use; for drawings in Arial, fonts-liberation has the same letter widths:

apt-get install -y --no-install-recommends fonts-liberation

Building on a build server? See Build Servers, CI and Containers in the License Guide for ThinkGeo 15. Using ThinkGeo 14 or earlier? See the ThinkGeo 14 Deployment Guide.