Skip to content

feat: conform dotnet templates to match react template DX#558

Open
loekensgard wants to merge 13 commits intomainfrom
feat/dotnet-template-placeholders
Open

feat: conform dotnet templates to match react template DX#558
loekensgard wants to merge 13 commits intomainfrom
feat/dotnet-template-placeholders

Conversation

@loekensgard
Copy link
Copy Markdown
Member

@loekensgard loekensgard commented Mar 26, 2026

What

Aligns the dotnet templates with the React template's developer experience:

  • All configuration values are now SCREAMING_SNAKE_CASE placeholder tokens in the scaffolded output, dotnet new iwebapi works with zero arguments
  • Users who have values ready can still supply them via flags for direct substitution
  • Solution files migrated from .sln to the new .slnx format (default in .NET 10), should also squash the problem we had with generate.sln files
  • k8s HA config (rolling update, pod anti-affinity, PDB) extracted into components/high-availability/ following the React k8s structure
  • DefaultScope removed as a parameter, user_impersonation baked in
  • Documentation updated to lead with the no-flags scaffold command
  • Documentation sections rearranged for configuration after project setup
  • I also added a CLAUDE.md to each of the templates, these can be removed and added later.

Why

Before the .NET 10 rebuild the DX felt better, this PR moves us back towards that experience. The current experience "require" developers to hunt down Azure AD client IDs, tenant IDs, ArgoCD project names, and OpenShift namespaces before they can even scaffold. This slows time-to-coding significantly.

I feel like the react template nailed this, where we can scaffold, start coding and then fill in the values when ready.
The .net templates have no ability to show a "status" for each config value, but I still think this is a better approach.

What's next

This also sets up the templates for an agentic workflow: a skill can guide a developer through replacing all X tokens on the fly when it's time to deploy, without requiring any context at project creation time.

loekensgard and others added 13 commits March 26, 2026 19:41
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
All template parameters that developers don't know at scaffold time now
default to __SCREAMING_SNAKE_CASE__ placeholder tokens. Users can still
supply values via dotnet new flags for direct substitution.

DefaultScope removed as a template parameter (api-scope baked in as
user_impersonation). Coalesce fallbacks for ArgoProject, OpenShiftNamespace,
GitHubRepoUrl removed.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…examples

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Coalesce fallbacks for ArgoProject, OpenShiftNamespace, GitHubRepoUrl
removed — these now default to __X__ placeholder tokens.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The exclude paths had a spurious Company.Worker1/ prefix causing cron job
and deployment YAML exclusions to never take effect.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Replaces legacy .sln files with the new .slnx XML-based format
introduced in .NET 10. Project references use file paths instead of
GUIDs, eliminating the need for the 'add projects to solution'
post-action and the .generated.sln workaround for IDE hosts.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Microsoft.Identity.Web 4.4.0 requires >= 11.0.0 via its certificate
dependency, causing a NU1605 downgrade error at restore time.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Show simple no-flags scaffold command as the primary example
- Add placeholder token tables for both templates
- Show flags as optional "if you have values ready" alternative
- Remove --scope parameter (removed from template)
- Update VS tab info boxes to reflect optional parameters

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Follows the React template pattern. Moves rolling update strategy,
pod anti-affinity, and PDB (minAvailable: 2) into a reusable
Kustomize component. Base now starts at 1 replica, dev overlay sets
2, production overlay uses the HA component (3 replicas).

iworker only applies the HA component for Deployment workers,
not CronJobs.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Aligns with React template's approach — these are setup steps
to complete when ready to deploy, not blockers before scaffolding.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- Rename prerequisites to configuration (position 3→4)
- Move Set up before Configuration (position 4→3)
- Move Sentry and Deploy into Configuration
- Move 'Pushing your application' from Create Project to GitHub page
- Replace all 'save for later' tips with 'replace __X__ placeholder' instructions
- Fix sidebar_position frontmatter after file moves

New flow: Introduction → Installation → Set up (Create Project)
→ Configuration (GitHub + push, Entra ID, OpenShift, Sentry, Deploy)
→ Azure App Config → Versioning → Further Reading

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
…project

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Minimal context file covering non-obvious requirements: .NET version,
placeholder token behaviour, release-please versioning, and k8s HA
component placement. Excluded from --projectOnly scaffolds.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@loekensgard loekensgard marked this pull request as ready for review March 26, 2026 21:21
@loekensgard loekensgard requested a review from h3rmanj March 26, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant