Function.SDK.CSharp.SourceGenerator
1.0.0-alpha.48
dotnet add package Function.SDK.CSharp.SourceGenerator --version 1.0.0-alpha.48
NuGet\Install-Package Function.SDK.CSharp.SourceGenerator -Version 1.0.0-alpha.48
<PackageReference Include="Function.SDK.CSharp.SourceGenerator" Version="1.0.0-alpha.48" />
<PackageVersion Include="Function.SDK.CSharp.SourceGenerator" Version="1.0.0-alpha.48" />
<PackageReference Include="Function.SDK.CSharp.SourceGenerator" />
paket add Function.SDK.CSharp.SourceGenerator --version 1.0.0-alpha.48
#r "nuget: Function.SDK.CSharp.SourceGenerator, 1.0.0-alpha.48"
#:package Function.SDK.CSharp.SourceGenerator@1.0.0-alpha.48
#addin nuget:?package=Function.SDK.CSharp.SourceGenerator&version=1.0.0-alpha.48&prerelease
#tool nuget:?package=Function.SDK.CSharp.SourceGenerator&version=1.0.0-alpha.48&prerelease
function-sdk-csharp
The C# SDK for writing composition functions.
Working example, https://github.com/IvanJosipovic/function-kubemodelrepo
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 10 SDK
dotnet debug
Run Function In Docker
docker build -t function-sdk-csharp-example -f src/Function.SDK.CSharp.Example/Dockerfile src
docker run -it -p 9443:9443 function-sdk-csharp-example
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
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.48 | 45 | 3/5/2026 |
| 1.0.0-alpha.47 | 184 | 3/2/2026 |
| 1.0.0-alpha.46 | 135 | 2/26/2026 |
| 1.0.0-alpha.45 | 335 | 12/14/2025 |
| 1.0.0-alpha.44 | 205 | 10/21/2025 |
| 1.0.0-alpha.43 | 161 | 10/17/2025 |
| 1.0.0-alpha.42 | 240 | 9/25/2025 |
| 1.0.0-alpha.41 | 172 | 9/25/2025 |
| 1.0.0-alpha.40 | 166 | 9/25/2025 |
| 1.0.0-alpha.39 | 149 | 9/25/2025 |
| 1.0.0-alpha.38 | 149 | 9/25/2025 |
| 1.0.0-alpha.37 | 154 | 9/25/2025 |
| 1.0.0-alpha.36 | 177 | 9/24/2025 |
| 1.0.0-alpha.35 | 253 | 9/20/2025 |
| 1.0.0-alpha.34 | 220 | 9/20/2025 |
| 1.0.0-alpha.33 | 253 | 9/19/2025 |
| 1.0.0-alpha.32 | 211 | 9/19/2025 |
| 1.0.0-alpha.31 | 267 | 9/17/2025 |
| 1.0.0-alpha.30 | 218 | 8/29/2025 |
| 1.0.0-alpha.29 | 204 | 8/26/2025 |