Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions dev/Templates/Dotnet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 4 additions & 1 deletion dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 <name>.cs whose #: directives replace the .csproj.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
"text": "Microsoft.UI.Reactor version"
},
"isVisible": "true"
},
{
"id": "windowsAppSdkVersion",
"name": {
"text": "Windows App SDK version"
},
"isVisible": "true"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
"text": "Microsoft.UI.Reactor version"
},
"isVisible": "true"
},
{
"id": "windowsAppSdkVersion",
"name": {
"text": "Windows App SDK version"
},
"isVisible": "true"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
"text": "Microsoft.UI.Reactor version"
},
"isVisible": "true"
},
{
"id": "windowsAppSdkVersion",
"name": {
"text": "Windows App SDK version"
},
"isVisible": "true"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@
"text": "Microsoft.UI.Reactor version"
},
"isVisible": "true"
},
{
"id": "windowsAppSdkVersion",
"name": {
"text": "Windows App SDK version"
},
"isVisible": "true"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$WindowsSdkBuildToolsVersion$" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$WindowsAppSdkVersion$" />
<!--
Microsoft.Windows.SDK.BuildTools.WinApp adds first-class support for
`dotnet run` on packaged apps: it hooks the .NET CLI Run target to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$WindowsSdkBuildToolsVersion$" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$WindowsAppSdkVersion$" />
<!--
Microsoft.Windows.SDK.BuildTools.WinApp adds first-class support for
`dotnet run` on packaged apps: it hooks the .NET CLI Run target to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$WindowsSdkBuildToolsVersion$" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$WindowsAppSdkVersion$" />
<!--
Microsoft.Windows.SDK.BuildTools.WinApp adds first-class support for
`dotnet run` on packaged apps: it hooks the .NET CLI Run target to
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#:package Microsoft.UI.Reactor@$ReactorVersion$
#:package Microsoft.WindowsAppSDK@$WindowsAppSdkVersion$
#:package Microsoft.Windows.SDK.BuildTools.WinApp@$WindowsSdkBuildToolsWinAppVersion$
#:property OutputType=WinExe
#:property TargetFramework=$DotNetVersion$-windows10.0.26100.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="$WindowsSdkBuildToolsVersion$" />
<PackageReference Include="Microsoft.WindowsAppSDK" Version="$WindowsAppSdkVersion$" />
<!--
Microsoft.Windows.SDK.BuildTools.WinApp adds first-class support for
`dotnet run` on packaged apps: it hooks the .NET CLI Run target to
Expand Down