Skip to content

Commit 093f3f5

Browse files
committed
fix(reg): Adjust dotnet new unoapp parameters
1 parent 72286c3 commit 093f3f5

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@
324324
.Replace("UseAppKit", "macos")
325325
.Replace("UseCatalyst", "maccatalyst")
326326
.Replace("UseServer", "hosted")
327+
.Replace("$UseWinUI$", "$Windows$")
327328
.Replace("$UseWebAssembly$", "$WebAssembly$")
328329
.Replace("$UseWebAssemblyManifestJson$", "$wasm-pwa-manifest$")
329330
.Replace("$basetargetframework$", "net6.0")

src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp/.template.config/template.json

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,12 @@
107107
"defaultValue": "true",
108108
"description": "Enables the WebAssembly platform support project"
109109
},
110+
"Windows": {
111+
"type": "parameter",
112+
"dataType": "bool",
113+
"defaultValue": "true",
114+
"description": "Enables the Windows platform support project"
115+
},
110116
"mobile": {
111117
"type": "parameter",
112118
"dataType": "bool",
@@ -131,17 +137,11 @@
131137
"defaultValue": "true",
132138
"description": "Enables the Skia/Linux Framebuffer platform support project"
133139
},
134-
"winui-desktop": {
135-
"type": "parameter",
136-
"dataType": "bool",
137-
"defaultValue": "true",
138-
"description": "Enables the WinUI desktop platform support project"
139-
},
140140
"vscode": {
141141
"type": "parameter",
142142
"dataType": "bool",
143143
"defaultValue": "false",
144-
"description": "Adds the Visual Studio Code Debugging support files for WebAssembly"
144+
"description": "Adds the Visual Studio Code Debugging support files for WebAssembly",
145145
},
146146
"skipRestore": {
147147
"type": "parameter",
@@ -155,6 +155,12 @@
155155
"description": "Enables the generation of a PWA manifest for WebAssembly",
156156
"defaultValue": "false"
157157
},
158+
"hosted": {
159+
"type": "parameter",
160+
"datatype": "bool",
161+
"description": "Enables the ASP.NET Core hosting project",
162+
"defaultValue": "true"
163+
},
158164
"android": {
159165
"type": "generated",
160166
"generator": "casing",
@@ -183,14 +189,6 @@
183189
"source": "mobile"
184190
}
185191
},
186-
"hosted": {
187-
"type": "generated",
188-
"generator": "constant",
189-
"dataType": "bool",
190-
"parameters": {
191-
"value": "True"
192-
}
193-
},
194192
"Framework": {
195193
"type": "parameter",
196194
"description": "The target framework for the project.",
@@ -238,7 +236,7 @@
238236
"path": "UnoWinUIQuickStart.Server\\UnoWinUIQuickStart.Server.csproj"
239237
},
240238
{
241-
"condition": "winui-desktop",
239+
"condition": "Windows",
242240
"path": "UnoWinUIQuickStart.Windows\\UnoWinUIQuickStart.Windows.csproj"
243241
},
244242
{

src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/content/unoapp/UnoWinUIQuickStart.sln

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnoWinUIQuickStart.Skia.WPF
3131
EndProject
3232
#//#endif
3333

34-
#//#if (winui-desktop)
34+
#//#if (Windows)
3535
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnoWinUIQuickStart.Windows", "UnoWinUIQuickStart.Windows\UnoWinUIQuickStart.Windows.csproj", "{1AA13270-F438-4864-9435-54FD806E10EA}"
3636
EndProject
3737
#//#endif

0 commit comments

Comments
 (0)