Skip to content

Commit 3f721f3

Browse files
Merge pull request #28 from Chris-Wolfgang/create-item-template
Create project template that can be used by CLI and VS
2 parents 31eebd1 + 4e7527f commit 3f721f3

File tree

5 files changed

+68
-4
lines changed

5 files changed

+68
-4
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"$schema": "http://json.schemastore.org/vs-2017.3.host",
3+
"icon": "icon.png",
4+
"symbolInfo": [
5+
{
6+
"id": "AuthorName",
7+
"name": {
8+
"text": "Author Name"
9+
},
10+
"isVisible": "true"
11+
},
12+
{
13+
"id": "Description",
14+
"name": {
15+
"text": "Description"
16+
},
17+
"isVisible": "true"
18+
}
19+
]
20+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "http://json.schemastore.org/template",
3+
"author": "Chris Wolfgang",
4+
"classifications": [ "Console" ],
5+
"identity": "Wolfgang.Preconfigured.Console",
6+
"name": "Wolfgang Preconfigured Console App",
7+
"shortName": "wpconsole",
8+
"sourceName": "ConsoleAppTemplate",
9+
"description": "A console application preconfigured with additional package including McMaster's CommandLineUtils, Serilog and others'",
10+
"defaultName": "ConsoleApp",
11+
"tags": {
12+
"language": "C#",
13+
"type": "project"
14+
},
15+
"postActions": [
16+
{
17+
"description": "Run package upgrade",
18+
"manualInstructions": [
19+
{
20+
// TODO run a CLI to upgrade packages
21+
"text": "Review the ReadMe.md file in the root of the project for a descrption of the project and next steps"
22+
}
23+
],
24+
"actionId": "AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C",
25+
"continueOnError": true
26+
},
27+
{
28+
"description": "Review ReadMe.md",
29+
"manualInstructions": [
30+
{
31+
"text": "Review the ReadMe.md file in the root of the project for a descrption of the project and next steps"
32+
}
33+
],
34+
"actionId": "AC1156F7-BB77-4DB8-B28F-24EEBCCA1E5C",
35+
"continueOnError": true
36+
}
37+
]
38+
}

ConsoleAppTemplate/ConsoleAppTemplate/Command/SampleCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ internal class SampleCommand
5454

5555
[Option
5656
(
57-
Description = "If set, the program will not send an email when complete"
57+
Description = "When specified, sends an email notification to the specified address"
5858
)
5959
]
6060
[EmailAddress]
6161
[MaxLength(255)]
62-
public string? NotifyUponComplete { get; set; }
62+
public string? EmailAddress { get; set; }
6363

6464

6565
internal async Task<int> OnExecuteAsync

ConsoleAppTemplate/ConsoleAppTemplate/ConsoleAppTemplate.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<TargetFramework>net8.0</TargetFramework>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
8+
<PackageVersion>1.0.0-alpha</PackageVersion>
89
</PropertyGroup>
910

1011
<ItemGroup>

ConsoleAppTemplate/ConsoleAppTemplate/ReadMe.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ To view the list of TODOs, in Visual Studio, under the View menu, select Task Li
2626
## Project
2727

2828
1. Set the version of .Net that you want to use
29-
1. Run package restore to get the latest packages - While the packages were updated when this template was made, and periodically updated, it is still best to run update before you get started
30-
1. Set the version number in the project file. See [Semver.org](https://semver.org/) for more information on symantec versioning.
29+
1. Set the version number in the project file. See [Semver.org](https://semver.org/)
30+
for more information on symantec versioning. You can set the version number by
31+
right clicking on the project and selecting `Edit Project File` and changing the
32+
version number.
33+
1. Run package restore to get the latest packages. While the packages were updated
34+
when this template was made, and periodically updated, it is still best to run
35+
update before you get started
3136

3237

3338

0 commit comments

Comments
 (0)