You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Opinionated, execution-ready guidance for building distributed apps with **.NET 10** + **Aspire** in a **single C# file**.
3
+
> Opinionated, execution‑ready guidance for building distributed apps with **.NET 10** + **Aspire** in a **single C# file**.
4
+
5
+
---
6
+
7
+
## 🔒 Hard Requirements (Do‑Not‑Break)
8
+
9
+
1.**Do not expand** an FBA into a multi‑project structure **unless the user explicitly asks for conversion**. The template must remain a **single‑file** FBA by default.
10
+
11
+
2.**SDK directive order and presence are mandatory** (at the very top, immediately after the shebang on Unix):
4. AppHost builds do **not** benefit from AOT. **Keep it off**:
25
+
26
+
```csharp
27
+
#:property PublishAot=False
28
+
```
29
+
30
+
5. When referencing external containers, you **must consult the container’s official README** (Docker Hub or GitHub project) to identify and apply appropriate environment variables. Always prefer documented variables over guesses. If no README guidance is available, use the container’s default safe configuration.
31
+
32
+
> These five rules override any other guidance in this file.
4
33
5
34
---
6
35
@@ -23,7 +52,7 @@ cat > apphost.cs << 'CS'
23
52
#:property Nullable=enable
24
53
#:property UserSecretsId=<GUID> # use `dotnet user-secrets init` to generate
25
54
26
-
// --- Top-level program (must precede type declarations) ---
55
+
// --- Top-level writefreely (must precede type declarations) ---
27
56
using Aspire.Hosting;
28
57
29
58
var builder = DistributedApplication.CreateBuilder(args);
@@ -75,7 +104,7 @@ dotnet run apphost.cs -- --help
0 commit comments