Microsoft.Azure.ApiManagement.PolicyToolkit.Compiling 1.1.0

Prefix Reserved
dotnet tool install --global Microsoft.Azure.ApiManagement.PolicyToolkit.Compiling --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Microsoft.Azure.ApiManagement.PolicyToolkit.Compiling --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Microsoft.Azure.ApiManagement.PolicyToolkit.Compiling&version=1.1.0
                    
nuke :add-package Microsoft.Azure.ApiManagement.PolicyToolkit.Compiling --version 1.1.0
                    

Azure API Management Policy Toolkit Compiler

This project builds a dotnet tool which can compile C# policy documents into Azure API Management XML (rawxml / Razor) policy documents.

Install

Install the Microsoft Azure Api Management Policy Toolkit compiler CLI tool with NuGet:

dotnet tool install Azure.ApiManagement.PolicyToolkit.Compiling

Output format

By default the compiler emits documents in the rawxml policy format. Pass --policy-format xml to emit the standards-compliant xml content format instead. See the Output format guide for the trade-offs between the two formats and how they map to the API Management content format.

Inspect generated policy

<policies>
    <inbound>
        <base/>
        <set-header name="X-Hello" exists-action="override">
            <value>@("World")</value>
        </set-header>
    </inbound>
</policies>

Documentation

Documentation is available to help you learn how to use this package:

Examples

Code samples for using the toolkit can be found in the following locations

Troubleshooting

Contributing

For details on contributing to this repository, see the contributing guide.

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (for example, label, comment). Follow the instructions provided by the bot. You'll only need to do this action once across all repositories using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information, see the Code of Conduct FAQ or contact opencode@microsoft.com with any other questions or comments.

Product Compatible and additional computed target framework versions.
.NET 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 was computed.  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.

Version Downloads Last Updated
1.1.0 124 8/24/2026
1.1.0-rc.1 65 8/24/2026