Skip to content

Commit 7611cb5

Browse files
loekensgardclaude
andauthored
fix(dotnet): correct template parameter names to avoid conflicts (#501)
Changed template CLI parameter names to use full names instead of shortened versions: - `--project` → `--projectOnly` (avoids conflict with built-in --project option) - `--cron` → `--cronJob` (matches symbol name for consistency) Updated: - dotnetcli.host.json files for both iwebapi and iworker templates - Documentation to reflect correct parameter usage - Bumped package version to 2.1.2 The built-in `--project` option is for context evaluation, while our `projectOnly` parameter controls output structure (project-only vs full solution). These serve different purposes and cannot be combined. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <[email protected]>
1 parent 1c101cd commit 7611cb5

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

docusaurus/dotnet/4-setup/1-create-project.mdx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ dotnet run --project MyApiService/MyApiService.csproj
5353

5454
**Advanced options:**
5555

56-
If you only want to create a project (without a solution), use the `--project` argument.
56+
If you only want to create a project (without a solution), use the `--projectOnly` argument.
5757
:::info
58-
The `--project` parameter will skip the creation of ArgoCD, k8s deployment and release-please. The parameters `--argo-project`, `--openshift-namespace` and `--github-repo-url` will be ignored.
58+
The `--projectOnly` parameter will skip the creation of ArgoCD, k8s deployment and release-please. The parameters `--argo-project`, `--openshift-namespace` and `--github-repo-url` will be ignored.
5959
:::
6060

6161
```shell
62-
dotnet new iwebapi -o MyApiService --project
62+
dotnet new iwebapi -o MyApiService --projectOnly
6363
```
6464

6565
To see all available parameters:
@@ -128,18 +128,18 @@ dotnet run --project MyWorkerService/MyWorkerService.csproj
128128
**Advanced options:**
129129

130130
:::info
131-
The `--project` parameter will skip the creation of ArgoCD, k8s deployment and release-please. The parameters `--argo-project`, `--openshift-namespace` and `--github-repo-url` will be ignored.
131+
The `--projectOnly` parameter will skip the creation of ArgoCD, k8s deployment and release-please. The parameters `--argo-project`, `--openshift-namespace` and `--github-repo-url` will be ignored.
132132
:::
133133

134134
```shell
135-
dotnet new iworker -o MyWorkerService --project
135+
dotnet new iworker -o MyWorkerService --projectOnly
136136
```
137137

138138
For scheduled tasks, you can create a Kubernetes CronJob instead of a Deployment:
139139

140140
```shell
141141
# Create a worker service configured as a scheduled job
142-
dotnet new iworker -o MyScheduledWorker --cronJob true
142+
dotnet new iworker -o MyScheduledWorker --cronJob
143143
```
144144

145145
To see all available parameters:
@@ -187,8 +187,8 @@ These parameters are available for both templates:
187187
| Parameter | Description |
188188
| ---------------------------- | ------------------------------------------------------------------------------------------- |
189189
| `-o, --output` | Output directory for the generated project |
190-
| `-p, --project` | Creates only the project without a solution file, ArgoCD, k8s deployment and release-please |
191-
| `-f, --framework` | Target framework version (defaults to net9.0) |
190+
| `-p, --projectOnly` | Creates only the project without a solution file, ArgoCD, k8s deployment and release-please |
191+
| `-f, --framework` | Target framework version (defaults to net10.0) |
192192
| `-ap, --argo-project` | Argo Project Name (e.g. AppServices). This is the "folder" for your applications in ArgoCD |
193193
| `-on, --openshift-namespace` | OpenShift Namespace (e.g. aa-appservices-dev) |
194194
| `-gru, --github-repo-url` | GitHub Repository URL |
@@ -214,9 +214,9 @@ The following parameters are specific to the `iwebapi` template:
214214

215215
The following parameters are specific to the `iworker` template:
216216

217-
| Parameter | Description |
218-
| ------------ | -------------------------------------------------------------------- |
219-
| `-c, --cron` | Set to `true` to create a Kubernetes CronJob instead of a Deployment |
217+
| Parameter | Description |
218+
| --------------- | ----------------------------------------------------------------- |
219+
| `-c, --cronJob` | Creates a Kubernetes CronJob instead of a continuous Deployment |
220220

221221
</details>
222222

dotnet/Intility.Templates.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<PropertyGroup>
44
<PackageType>Template</PackageType>
5-
<PackageVersion>2.1.1</PackageVersion>
5+
<PackageVersion>2.1.2</PackageVersion>
66
<PackageId>Intility.Templates</PackageId>
77
<Title>Intility Templates</Title>
88
<Authors>Intility</Authors>

dotnet/iwebapi/.template.config/dotnetcli.host.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"shortName": ""
2727
},
2828
"projectOnly": {
29-
"longName": "project",
29+
"longName": "projectOnly",
3030
"shortName": "p"
3131
},
3232
"UserSecretsId": {
@@ -47,6 +47,6 @@
4747
},
4848
"usageExamples": [
4949
"--client-id \"11111111-1111-1111-11111111111111111\" --tenant-id \"9b5ff18e-53c0-45a2-8bc2-9c0c8f60b2c6\"",
50-
"-p --no-restore"
50+
"--projectOnly --no-restore"
5151
]
5252
}

dotnet/iworker/.template.config/dotnetcli.host.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
"shortName": ""
1111
},
1212
"projectOnly": {
13-
"longName": "project",
13+
"longName": "projectOnly",
1414
"shortName": "p"
1515
},
1616
"cronJob": {
17-
"longName": "cron",
17+
"longName": "cronJob",
1818
"shortName": "c"
1919
},
2020
"ArgoProject": {
@@ -30,5 +30,5 @@
3030
"shortName": "gru"
3131
}
3232
},
33-
"usageExamples": ["--cron", "-p --no-restore"]
33+
"usageExamples": ["--cronJob", "--projectOnly --no-restore"]
3434
}

0 commit comments

Comments
 (0)