Skip to content

Commit cbe0891

Browse files
author
Nick Klingensmith
committed
Add a dotnet workload restore command to the sk-multi template initialization
1 parent 43561cc commit cbe0891

3 files changed

Lines changed: 20 additions & 5 deletions

File tree

StereoKit.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>0.8.2</PackageVersion>
5+
<PackageVersion>0.8.3</PackageVersion>
66
<PackageId>StereoKit.Templates</PackageId>
77
<Title>StereoKit dotnet templates</Title>
88
<Authors>StereoKit</Authors>

Test.ps1

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,22 +98,27 @@ if ($mode -eq 'run_in_place') {
9898
Pop-Location
9999

100100
if ($template -eq 'all' -or $template -eq 'sk-multi') {
101+
102+
Write-Host "## Testing sk-multi ##"
101103
Push-Location -Path "$PSScriptRoot\test\$multiName"
102-
& dotnet new sk-multi
103-
& dotnet build
104+
& dotnet new sk-multi --allow-scripts Yes
105+
Write-Host "## Testing sk-multi - desktop ##"
104106
& dotnet run
105-
& dotnet publish -c Release "Projects/Android/$($multiName)_Android.csproj"
107+
Write-Host "## Testing sk-multi - android ##"
108+
& dotnet publish -c Release "Projects/Android/$($multiName).Android.csproj"
106109
Pop-Location
107110
}
108111

109112
if ($template -eq 'all' -or $template -eq 'sk-net') {
113+
Write-Host "## Testing sk-net ##"
110114
Push-Location -Path "$PSScriptRoot\test\$netName"
111115
& dotnet new sk-net
112116
& dotnet run
113117
Pop-Location
114118
}
115119

116120
if ($template -eq 'all' -or $template -eq 'sk-sketch') {
121+
Write-Host "## Testing sk-sketch ##"
117122
Push-Location -Path "$PSScriptRoot\test\$sketchName"
118123
& dotnet new sk-sketch
119124
& dotnet run

templates/SKTemplate_Multi/.template.config/template.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "http://json.schemastore.org/template",
33
"author": "StereoKit",
4-
"classifications": [ "StereoKit", "Desktop", "Android", "Linux", "Windows"],
4+
"classifications": [ "StereoKit", "Desktop", "Windows", "Linux", "Android" ],
55
"identity": "StereoKitTemplate.MultitargetProject",
66
"name": "StereoKit: Multitarget project",
77
"description": "A cross-platform starter template for Mixed Reality desktop VR projects using StereoKit and .NET Core!",
@@ -24,6 +24,16 @@
2424
"manualInstructions": [ { "text": "Run 'dotnet restore'" } ],
2525
"actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
2626
"continueOnError": true
27+
},{
28+
"description": "Restore required .NET workloads (e.g., Android).",
29+
"manualInstructions": [{ "text": "Run 'dotnet workload restore'" }],
30+
"actionId": "3A7C4B45-1F5D-4A30-959A-51B88E82B5D2",
31+
"args": {
32+
"executable": "dotnet",
33+
"args": "workload restore",
34+
"redirectStandardOutput": false
35+
},
36+
"continueOnError": true
2737
}],
2838
"symbols": {
2939
"framework": {

0 commit comments

Comments
 (0)