Skip to content

Commit a1c8279

Browse files
committed
Add build script support to VS Code tasks
1 parent addd1a6 commit a1c8279

File tree

2 files changed

+90
-3
lines changed

2 files changed

+90
-3
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ PSReadline.zip
99
[Oo]bj/
1010
.ionide/
1111

12-
# VSCode directories that are not at the repository root
13-
/**/.vscode/
14-
1512
# mstest test results
1613
TestResults
1714
FakesAssemblies/

.vscode/tasks.json

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "Bootstrap",
6+
"type": "shell",
7+
"command": "pwsh",
8+
"args": [
9+
"./build.ps1",
10+
"-Bootstrap"
11+
],
12+
"group": "build",
13+
"detail": "Install build prerequisites (InvokeBuild, .NET SDK)"
14+
},
15+
{
16+
"label": "Build",
17+
"type": "shell",
18+
"command": "pwsh",
19+
"args": [
20+
"./build.ps1",
21+
"-Configuration",
22+
"${input:configuration}"
23+
],
24+
"group": {
25+
"kind": "build",
26+
"isDefault": true
27+
},
28+
"problemMatcher": [
29+
"$msCompile"
30+
],
31+
"detail": "Build with user-selected configuration"
32+
},
33+
{
34+
"label": "Run Tests",
35+
"type": "shell",
36+
"command": "pwsh",
37+
"args": [
38+
"./build.ps1",
39+
"-Test",
40+
"-Configuration",
41+
"${input:configuration}",
42+
"-Framework",
43+
"${input:framework}"
44+
],
45+
"group": {
46+
"kind": "test",
47+
"isDefault": true
48+
},
49+
"presentation": {
50+
"focus": true,
51+
"panel": "dedicated",
52+
"clear": true
53+
},
54+
"detail": "Run unit tests with selected configuration and framework"
55+
},
56+
{
57+
"label": "Clean",
58+
"type": "shell",
59+
"command": "pwsh",
60+
"args": [
61+
"./build.ps1",
62+
"-Clean"
63+
],
64+
"group": "build",
65+
"detail": "Clean build artifacts"
66+
}
67+
],
68+
"inputs": [
69+
{
70+
"id": "configuration",
71+
"description": "Build Configuration",
72+
"type": "pickString",
73+
"options": [
74+
"Debug",
75+
"Release"
76+
],
77+
"default": "Debug"
78+
},
79+
{
80+
"id": "framework",
81+
"description": "Target Framework",
82+
"type": "pickString",
83+
"options": [
84+
"net472",
85+
"net6.0"
86+
],
87+
"default": "net6.0"
88+
}
89+
]
90+
}

0 commit comments

Comments
 (0)