diff --git a/dev/Templates/Dotnet/README.md b/dev/Templates/Dotnet/README.md index 0a1c4bba5a..ccc60caa33 100644 --- a/dev/Templates/Dotnet/README.md +++ b/dev/Templates/Dotnet/README.md @@ -66,9 +66,19 @@ Reactor apps are packaged (single-project MSIX) and reference the preview NuGet package. They require .NET 10 or later. Like the WinUI templates, they reference `Microsoft.Windows.SDK.BuildTools.WinApp` so `dotnet run` launches the app with full MSIX package identity. Pin a specific Reactor package version -at scaffold time with `--reactor-version`, or the Windows App SDK version with -`--wasdk-version`. `reactor-singlefile` is the one exception to the project -layout: see [Quickstart a single-file Reactor app](#quickstart-a-single-file-reactor-app). +at scaffold time with `--reactor-version`. `reactor-singlefile` is the one +exception to the project layout: see +[Quickstart a single-file Reactor app](#quickstart-a-single-file-reactor-app). + +The Reactor templates don't reference the `Microsoft.WindowsAppSDK` metapackage. +`Microsoft.UI.Reactor` brings in only the Windows App SDK packages it needs +(`Microsoft.WindowsAppSDK.WinUI` and `Microsoft.WindowsAppSDK.Runtime`) +transitively. This keeps the AI and ML components (for example +`onnxruntime.dll` and `DirectML.dll`) out of the app, including trimmed and +Native AOT publishes. To use another Windows App SDK component, add its package +yourself, or reference the full `Microsoft.WindowsAppSDK` metapackage. The +version you pick must match the `Microsoft.WindowsAppSDK.Runtime` version that +Reactor brings in. ### Item Templates diff --git a/dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 b/dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 index d27437622f..1e449bbf6c 100644 --- a/dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 +++ b/dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 @@ -360,7 +360,10 @@ function Test-WinUiProjectTemplate { $projectName = '{0}_{1}_{2}' -f $TemplateShortName, $Platform, ([Guid]::NewGuid().ToString('N').Substring(0, 8)) $projectPath = Join-Path -Path $WorkingRoot -ChildPath $projectName - New-ProjectFromTemplate -TemplateShortName $TemplateShortName -ProjectName $projectName -OutputPath $projectPath -WorkingDirectory $WorkingRoot -WindowsAppSdkVersion $script:windowsAppSdkVersion + # Reactor templates have no --wasdk-version option: Windows App SDK comes + # transitively from Microsoft.UI.Reactor (WinUI + Runtime), not the metapackage. + $wasdkVersion = if ($TemplateShortName -like 'reactor*') { $null } else { $script:windowsAppSdkVersion } + New-ProjectFromTemplate -TemplateShortName $TemplateShortName -ProjectName $projectName -OutputPath $projectPath -WorkingDirectory $WorkingRoot -WindowsAppSdkVersion $wasdkVersion Add-Result -Template $TemplateShortName -Platform $Platform -Step 'create' -Status 'Succeeded' -Path $projectPath # A file-based app template scaffolds a single .cs whose #: directives replace the .csproj. diff --git a/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/dotnetcli.host.json index 14bee23ae2..50bbe39922 100644 --- a/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/dotnetcli.host.json +++ b/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/dotnetcli.host.json @@ -11,11 +11,6 @@ "shortName": "rv", "description": "Pin to a specific Microsoft.UI.Reactor NuGet version." }, - "windowsAppSdkVersion": { - "longName": "wasdk-version", - "shortName": "wasdkv", - "description": "Pin to a specific Windows App SDK NuGet version." - }, "skipRestore": { "longName": "no-restore", "shortName": "" diff --git a/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/ide.host.json b/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/ide.host.json index b82567c7a7..f06910379a 100644 --- a/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/ide.host.json +++ b/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/ide.host.json @@ -21,13 +21,6 @@ "text": "Microsoft.UI.Reactor version" }, "isVisible": "true" - }, - { - "id": "windowsAppSdkVersion", - "name": { - "text": "Windows App SDK version" - }, - "isVisible": "true" } ] } diff --git a/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/template.json b/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/template.json index a3962f67e0..f1d433d1dc 100644 --- a/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/template.json +++ b/dev/Templates/Dotnet/templates/reactor-blank-app/.template.config/template.json @@ -50,17 +50,10 @@ "reactorVersion": { "type": "parameter", "datatype": "text", - "defaultValue": "0.1.0-preview.16", + "defaultValue": "0.1.0-preview.17", "replaces": "$ReactorVersion$", "description": "Microsoft.UI.Reactor (and Microsoft.UI.Reactor.Devtools) NuGet version to reference." }, - "windowsAppSdkVersion": { - "type": "parameter", - "datatype": "text", - "defaultValue": "*", - "replaces": "$WindowsAppSdkVersion$", - "description": "Microsoft.WindowsAppSDK NuGet version. Requires 2.2.0 or later; use * for the latest stable." - }, "windowsSdkBuildToolsVersion": { "type": "parameter", "datatype": "text", diff --git a/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/dotnetcli.host.json index 14bee23ae2..50bbe39922 100644 --- a/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/dotnetcli.host.json +++ b/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/dotnetcli.host.json @@ -11,11 +11,6 @@ "shortName": "rv", "description": "Pin to a specific Microsoft.UI.Reactor NuGet version." }, - "windowsAppSdkVersion": { - "longName": "wasdk-version", - "shortName": "wasdkv", - "description": "Pin to a specific Windows App SDK NuGet version." - }, "skipRestore": { "longName": "no-restore", "shortName": "" diff --git a/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/ide.host.json b/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/ide.host.json index b82567c7a7..f06910379a 100644 --- a/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/ide.host.json +++ b/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/ide.host.json @@ -21,13 +21,6 @@ "text": "Microsoft.UI.Reactor version" }, "isVisible": "true" - }, - { - "id": "windowsAppSdkVersion", - "name": { - "text": "Windows App SDK version" - }, - "isVisible": "true" } ] } diff --git a/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/template.json b/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/template.json index a5523cb911..c52bc7b179 100644 --- a/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/template.json +++ b/dev/Templates/Dotnet/templates/reactor-mvu-app/.template.config/template.json @@ -50,17 +50,10 @@ "reactorVersion": { "type": "parameter", "datatype": "text", - "defaultValue": "0.1.0-preview.16", + "defaultValue": "0.1.0-preview.17", "replaces": "$ReactorVersion$", "description": "Microsoft.UI.Reactor (and Microsoft.UI.Reactor.Devtools) NuGet version to reference." }, - "windowsAppSdkVersion": { - "type": "parameter", - "datatype": "text", - "defaultValue": "*", - "replaces": "$WindowsAppSdkVersion$", - "description": "Microsoft.WindowsAppSDK NuGet version. Requires 2.2.0 or later; use * for the latest stable." - }, "windowsSdkBuildToolsVersion": { "type": "parameter", "datatype": "text", diff --git a/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/dotnetcli.host.json index 14bee23ae2..50bbe39922 100644 --- a/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/dotnetcli.host.json +++ b/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/dotnetcli.host.json @@ -11,11 +11,6 @@ "shortName": "rv", "description": "Pin to a specific Microsoft.UI.Reactor NuGet version." }, - "windowsAppSdkVersion": { - "longName": "wasdk-version", - "shortName": "wasdkv", - "description": "Pin to a specific Windows App SDK NuGet version." - }, "skipRestore": { "longName": "no-restore", "shortName": "" diff --git a/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/ide.host.json b/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/ide.host.json index b82567c7a7..f06910379a 100644 --- a/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/ide.host.json +++ b/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/ide.host.json @@ -21,13 +21,6 @@ "text": "Microsoft.UI.Reactor version" }, "isVisible": "true" - }, - { - "id": "windowsAppSdkVersion", - "name": { - "text": "Windows App SDK version" - }, - "isVisible": "true" } ] } diff --git a/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/template.json b/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/template.json index ac9a031c14..7c1ca78dc3 100644 --- a/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/template.json +++ b/dev/Templates/Dotnet/templates/reactor-navigation-app/.template.config/template.json @@ -50,17 +50,10 @@ "reactorVersion": { "type": "parameter", "datatype": "text", - "defaultValue": "0.1.0-preview.16", + "defaultValue": "0.1.0-preview.17", "replaces": "$ReactorVersion$", "description": "Microsoft.UI.Reactor (and Microsoft.UI.Reactor.Devtools) NuGet version to reference." }, - "windowsAppSdkVersion": { - "type": "parameter", - "datatype": "text", - "defaultValue": "*", - "replaces": "$WindowsAppSdkVersion$", - "description": "Microsoft.WindowsAppSDK NuGet version. Requires 2.2.0 or later; use * for the latest stable." - }, "windowsSdkBuildToolsVersion": { "type": "parameter", "datatype": "text", diff --git a/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/dotnetcli.host.json index d143d64a6e..854e3bb31c 100644 --- a/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/dotnetcli.host.json +++ b/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/dotnetcli.host.json @@ -11,11 +11,6 @@ "shortName": "rv", "description": "Pin to a specific Microsoft.UI.Reactor NuGet version." }, - "windowsAppSdkVersion": { - "longName": "wasdk-version", - "shortName": "wasdkv", - "description": "Pin to a specific Windows App SDK NuGet version." - }, "skipRestore": { "longName": "no-restore", "shortName": "" diff --git a/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/template.json b/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/template.json index 7ca0a1a6ee..9f2e9aab5d 100644 --- a/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/template.json +++ b/dev/Templates/Dotnet/templates/reactor-singlefile-app/.template.config/template.json @@ -44,17 +44,10 @@ "reactorVersion": { "type": "parameter", "datatype": "text", - "defaultValue": "0.1.0-preview.16", + "defaultValue": "0.1.0-preview.17", "replaces": "$ReactorVersion$", "description": "Microsoft.UI.Reactor NuGet version to reference." }, - "windowsAppSdkVersion": { - "type": "parameter", - "datatype": "text", - "defaultValue": "*", - "replaces": "$WindowsAppSdkVersion$", - "description": "Microsoft.WindowsAppSDK NuGet version. Requires 2.2.0 or later; use * for the latest stable." - }, "windowsSdkBuildToolsWinAppVersion": { "type": "parameter", "datatype": "text", diff --git a/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/dotnetcli.host.json index 14bee23ae2..50bbe39922 100644 --- a/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/dotnetcli.host.json +++ b/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/dotnetcli.host.json @@ -11,11 +11,6 @@ "shortName": "rv", "description": "Pin to a specific Microsoft.UI.Reactor NuGet version." }, - "windowsAppSdkVersion": { - "longName": "wasdk-version", - "shortName": "wasdkv", - "description": "Pin to a specific Windows App SDK NuGet version." - }, "skipRestore": { "longName": "no-restore", "shortName": "" diff --git a/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/ide.host.json b/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/ide.host.json index b82567c7a7..f06910379a 100644 --- a/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/ide.host.json +++ b/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/ide.host.json @@ -21,13 +21,6 @@ "text": "Microsoft.UI.Reactor version" }, "isVisible": "true" - }, - { - "id": "windowsAppSdkVersion", - "name": { - "text": "Windows App SDK version" - }, - "isVisible": "true" } ] } diff --git a/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/template.json b/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/template.json index 423f744f53..9fc0ee5f64 100644 --- a/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/template.json +++ b/dev/Templates/Dotnet/templates/reactor-tabview-app/.template.config/template.json @@ -50,17 +50,10 @@ "reactorVersion": { "type": "parameter", "datatype": "text", - "defaultValue": "0.1.0-preview.16", + "defaultValue": "0.1.0-preview.17", "replaces": "$ReactorVersion$", "description": "Microsoft.UI.Reactor (and Microsoft.UI.Reactor.Devtools) NuGet version to reference." }, - "windowsAppSdkVersion": { - "type": "parameter", - "datatype": "text", - "defaultValue": "*", - "replaces": "$WindowsAppSdkVersion$", - "description": "Microsoft.WindowsAppSDK NuGet version. Requires 2.2.0 or later; use * for the latest stable." - }, "windowsSdkBuildToolsVersion": { "type": "parameter", "datatype": "text", diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ReactorBlankApp/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ReactorBlankApp/ProjectTemplate.csproj index 39f6a4a0c9..c18cebe3b7 100644 --- a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ReactorBlankApp/ProjectTemplate.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ReactorBlankApp/ProjectTemplate.csproj @@ -44,7 +44,6 @@ -