XdtRuntimeTransform 1.0.1
dotnet tool install --global XdtRuntimeTransform --version 1.0.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local XdtRuntimeTransform --version 1.0.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=XdtRuntimeTransform&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package XdtRuntimeTransform --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
XdtRuntimeTransform
A .NET CLI tool for applying XML Document Transformations (XDT) at runtime. Distributed as a NuGet tool package.
The primary use case is Docker-based deployments, where the tool is installed into an image and called from an entrypoint script to apply environment-specific config transforms before the application starts.
Installation
dotnet tool install -g XdtRuntimeTransform
Usage
xdt-runtime-transform <source> <transform> <output>
| Argument | Description |
|---|---|
source |
Path to the input XML file |
transform |
Path to the XDT transform file |
output |
Path to write the transformed XML file |
Exits with code 0 on success, 1 on failure (error written to stderr).
Docker Usage
Dockerfile — install the tool during image build:
RUN dotnet tool install --global XdtRuntimeTransform --version <version>
ENV PATH="$PATH:/root/.dotnet/tools"
entrypoint.sh — apply transform before app starts:
#!/bin/bash
set -e
xdt-runtime-transform \
/app/config/appsettings.xml \
/app/config/appsettings.${ENVIRONMENT}.xdt \
/app/config/appsettings.xml
exec "$@"
Dockerfile entrypoint wiring:
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["dotnet", "MyApp.dll"]
Prerequisites
- .NET 6, .NET 8, or .NET 10 runtime (the tool targets all three; the correct version is selected automatically)
Building Locally
dotnet build XdtRuntimeTransform.sln
To run without installing:
dotnet run --project src/XdtRuntimeTransform -- <source.xml> <transform.xdt> <output.xml>
Publishing
Publishing to NuGet.org is done manually. Pack the project with the desired version number, then push the resulting .nupkg:
dotnet pack src/XdtRuntimeTransform/XdtRuntimeTransform.csproj -c Release -p:PackageVersion=1.0.0 -o ./nuget_output
dotnet nuget push ./nuget_output/*.nupkg --api-key YOUR_API_KEY --source https://api.nuget.org/v3/index.json
Project Structure
src/
XdtRuntimeTransform/ # Console application (single file: Program.cs)
Dependencies
Microsoft.Web.Xdtv3.2.0
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.