Create Your First Hello World App Extension
This tutorial walks you through the complete lifecycle:
- Build a tiny extension
- Test it in your App
- Configure and export it
- Import it into another App
Step 1: Create the Extension File
In your App, create this folder:
/extensions/hello-world/
Inside it, create Greeting.cshtml:
@inherits Custom.Hybrid.RazorTyped
<div class="alert alert-info">
Hello, World
</div>
Tip
@inherits Custom.Hybrid.RazorTyped is optional, but recommended so you can use the 2sxc API later.
Step 2: Test the Extension Locally
Create a test Razor file in your App (not in /extensions/).
Render your extension in that file using @Html.Partial(...).
Tip
Keep this test file outside /extensions/ so it does not become part of your extension package.
Step 3: Configure and Build the Extension
Open App Settings -> App Extensions, then edit your extension.
Enable:
- Has Razor Files
Save the configuration.
Step 4: Import into Another App
- Go to App Settings -> App Extensions in the target App
- Click +
- Choose Select Files
- Pick the exported package
- Click Install
Optional: Publish to Marketplace
For production-ready extensions, you can publish packages in the 2sxc Marketplace.
Tip
If you want to publish, reach out and we can help with the packaging checklist.
Recap
You created, tested, configured, exported, and re-imported a working extension. That is the core workflow for all App Extensions.