Multi-language (Aspire Type System)
Aspire.Hosting.Netlify is annotated with the Aspire Type System
attributes so a TypeScript AppHost can consume it directly.
What gets exported
Section titled “What gets exported”| C# member | TS surface | Notes |
|---|---|---|
PublishAsNetlifySite(builder, NetlifyDeployOptions, authToken) | publishAsNetlifySite(jsApp, options, authToken) | Canonical export — full options shape. |
PublishAsNetlifySite(builder, string dir, authToken) | (C# only) | Marked [AspireExportIgnore]; TS users pass { dir, noBuild: true } to the canonical overload. |
WithNpmCommand(builder, string args) | withNpmCommand(npm, args) | The no-callback variant. |
WithNpmRunCommand(builder, string scriptName) | withNpmRunCommand(npm, scriptName) | The no-callback variant. |
AddNetlifyDeployPipeline(pipeline) | addNetlifyDeployPipeline(pipeline) | Registers the deploy steps on a pipeline. |
NetlifyDeployOptions | NetlifyDeployOptions (DTO) | Marked [AspireDto]. |
NetlifyDeploymentResource | NetlifyDeploymentResource | Properties: name, workingDirectory, options, buildDirectory, siteName, deploymentEnvironment. |
NpmCommandResource | NpmCommandResource | Single property: scriptName. |
What’s deliberately not exported
Section titled “What’s deliberately not exported”- Callback-form overloads of
WithNpmCommand/WithNpmRunCommand— inline C#Action<...>callbacks aren’t ATS-friendly. Annotationscollections on resources — they’re attached via separate builder methods, not exposed as exported properties.
Iterating locally
Section titled “Iterating locally”# In your TypeScript AppHost folder.aspire restore # regenerates .modules/ from referenced integrationsaspire run # boots the AppHostIf .modules/ is missing or stale, aspire restore is the way back to a
known-good state. Inspect .modules/aspire.ts to see the current exported
surface.
See also
Section titled “See also”- Quickstart — C# and TypeScript walkthrough.
- Configuration
- Aspire.dev — multi-language architecture
- Aspire.dev — multi-language integration authoring