Function.SDK.CSharp.SourceGenerator 1.0.0-alpha.28

This is a prerelease version of Function.SDK.CSharp.SourceGenerator.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Function.SDK.CSharp.SourceGenerator --version 1.0.0-alpha.28
                    
NuGet\Install-Package Function.SDK.CSharp.SourceGenerator -Version 1.0.0-alpha.28
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Function.SDK.CSharp.SourceGenerator" Version="1.0.0-alpha.28" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Function.SDK.CSharp.SourceGenerator" Version="1.0.0-alpha.28" />
                    
Directory.Packages.props
<PackageReference Include="Function.SDK.CSharp.SourceGenerator" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Function.SDK.CSharp.SourceGenerator --version 1.0.0-alpha.28
                    
#r "nuget: Function.SDK.CSharp.SourceGenerator, 1.0.0-alpha.28"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Function.SDK.CSharp.SourceGenerator@1.0.0-alpha.28
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Function.SDK.CSharp.SourceGenerator&version=1.0.0-alpha.28&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Function.SDK.CSharp.SourceGenerator&version=1.0.0-alpha.28&prerelease
                    
Install as a Cake Tool

function-sdk-csharp

codecov Nuget (with prereleases) Nuget (with prereleases)

The C# SDK for writing composition functions.

Features

  • XRD to Model Generation
    • Modify the xrd.yaml and models will be automatically generated
  • CRD to Model Generation
    • Add crd.yaml(s) to the project and models will be automatically generated
    • Most Crossplane Providers already published KubernetesCRDModelGen | Group | NuGet | |---|---| | aws.upbound.io | Link | | azapi.upbound.io | Link | | azure.upbound.io | Link | | azuread.upbound.io | Link | | crossplane.io | Link | | databricks.crossplane.io | Link | | gcp.upbound.io | Link | | helm.crossplane.io | Link | | kubernetes.crossplane.io | Link | | opentofu.upbound.io | Link | | tf.upbound.io | Link | | upbound.io | Link | | vault.upbound.io | Link |
  • Supports Crossplane v1.17 or greater

How to Test

You can run your function locally and test it using crossplane render with the example manifests.

Download Crank and rename to Crossplane

https://releases.crossplane.io/stable/current/bin

Run Function In IDE

Download the lastest .NET 9 SDK

dotnet debug

Run Function In Docker

docker build -t function-sdk-csharp-sample -f src/Function.SDK.CSharp.Sample/Dockerfile src
docker run -it -p 9443:9443 function-sdk-csharp-sample

Run Test

Then, in another terminal, call it with these example manifests

crossplane render example/xr.yaml example/composition.yaml example/functions.yaml
---
apiVersion: platform.example.com/v1alpha1
kind: XStorageBucket
metadata:
  name: example
status:
  conditions:
  - lastTransitionTime: "2024-01-01T00:00:00Z"
    message: 'Unready resources: account, container, and rg'
    reason: Creating
    status: "False"
    type: Ready
---
apiVersion: storage.azure.upbound.io/v1beta1
kind: Account
metadata:
  annotations:
    crossplane.io/composition-resource-name: account
  labels:
    crossplane.io/composite: example
  name: example
  ownerReferences:
  - apiVersion: platform.example.com/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: XStorageBucket
    name: example
    uid: ""
spec:
  forProvider:
    accountReplicationType: LRS
    accountTier: Standard
    blobProperties:
    - versioningEnabled: true
    infrastructureEncryptionEnabled: true
    location: eastus
    resourceGroupNameSelector:
      matchLabels:
        matchControllerRef: "True"
---
apiVersion: storage.azure.upbound.io/v1beta1
kind: Container
metadata:
  annotations:
    crossplane.io/composition-resource-name: container
  generateName: example-
  labels:
    crossplane.io/composite: example
  ownerReferences:
  - apiVersion: platform.example.com/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: XStorageBucket
    name: example
    uid: ""
spec:
  forProvider:
    containerAccessType: public
    storageAccountNameSelector:
      matchLabels:
        matchControllerRef: "True"
---
apiVersion: azure.upbound.io/v1beta1
kind: ResourceGroup
metadata:
  annotations:
    crossplane.io/composition-resource-name: rg
  generateName: example-
  labels:
    crossplane.io/composite: example
  ownerReferences:
  - apiVersion: platform.example.com/v1alpha1
    blockOwnerDeletion: true
    controller: true
    kind: XStorageBucket
    name: example
    uid: ""
spec:
  forProvider:
    location: eastus
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.45 182 12/14/2025
1.0.0-alpha.44 194 10/21/2025
1.0.0-alpha.43 147 10/17/2025
1.0.0-alpha.42 233 9/25/2025
1.0.0-alpha.41 159 9/25/2025
1.0.0-alpha.40 156 9/25/2025
1.0.0-alpha.39 141 9/25/2025
1.0.0-alpha.38 141 9/25/2025
1.0.0-alpha.37 144 9/25/2025
1.0.0-alpha.36 168 9/24/2025
1.0.0-alpha.35 246 9/20/2025
1.0.0-alpha.34 208 9/20/2025
1.0.0-alpha.33 244 9/19/2025
1.0.0-alpha.32 202 9/19/2025
1.0.0-alpha.31 259 9/17/2025
1.0.0-alpha.30 208 8/29/2025
1.0.0-alpha.29 198 8/26/2025
1.0.0-alpha.28 202 8/26/2025
1.0.0-alpha.27 201 8/25/2025
1.0.0-alpha.26 211 8/24/2025
1.0.0-alpha.25 207 8/24/2025
1.0.0-alpha.24 117 8/22/2025
1.0.0-alpha.23 129 8/22/2025
1.0.0-alpha.22 131 8/22/2025
1.0.0-alpha.19 131 8/21/2025
1.0.0-alpha.18 133 8/21/2025
1.0.0-alpha.17 129 8/21/2025
1.0.0-alpha.16 134 8/21/2025
1.0.0-alpha.15 132 8/21/2025
1.0.0-alpha.14 125 8/21/2025
1.0.0-alpha.13 127 8/21/2025
1.0.0-alpha.12 128 8/21/2025
1.0.0-alpha.11 135 8/21/2025
1.0.0-alpha.10 126 8/21/2025
1.0.0-alpha.9 127 8/21/2025
1.0.0-alpha.8 130 8/21/2025
1.0.0-alpha.7 133 8/21/2025
1.0.0-alpha.6 136 8/21/2025
1.0.0-alpha.5 135 8/21/2025
1.0.0-alpha.4 135 8/21/2025
1.0.0-alpha.3 136 8/20/2025
1.0.0-alpha.2 137 8/20/2025
1.0.0-alpha.1 135 8/21/2025