Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a3b1d80
Create Dotnet New Template Branch
MuyuanMS Feb 11, 2026
f0659d9
Unblocking single proj and item template from building
MuyuanMS Feb 11, 2026
290d0db
Add template csproj package reference specific to dotnet new template
MuyuanMS Feb 14, 2026
7f5bd2c
Remove multi-project packaged template
MuyuanMS Feb 14, 2026
e2b591a
feat(docs): add design principles, globalization, performance, securi…
yeelam-gordon Feb 14, 2026
3a1f888
User/muyuanli/add template pipeline (#6218)
MuyuanMS Feb 14, 2026
b6e4c89
Niels9001/temp update (#6207)
niels9001 Feb 25, 2026
653b3e2
docs(instructions): enhance guidelines for API usage and sample searc…
yeelam-gordon Feb 26, 2026
1953f1a
Ask Copilot to update the project to meet specific standards. (#6255)
yeelam-gordon Feb 26, 2026
acf07ec
User/muyuanli/improve template (#6259)
MuyuanMS Feb 27, 2026
182ac8c
Agent MD minor fixes (#6262)
MuyuanMS Mar 2, 2026
e0666c9
complete nuspec (#6267)
MuyuanMS Mar 9, 2026
a3d455e
Update default dotnet version to be 10.0 (#6282)
MuyuanMS Mar 12, 2026
74c77a3
set dotnet version based on installed sdk version, and increase windo…
nmetulev Mar 13, 2026
d410c62
Add test script and fix issue with item templates (#6303)
MuyuanMS Mar 17, 2026
2f9c0b0
Merge Build and Publish Pipeline (#6320)
MuyuanMS Mar 19, 2026
6a5a719
WinUI3 dotnet new tempalte updates (#6359)
nmetulev Mar 31, 2026
d4466e3
merge ado
DinahK-2SO Mar 31, 2026
d909b1c
Improves dotnet new templates for better IDE integration (#6344)
dotMorten Apr 1, 2026
0cf7dee
Update project template assets, layouts, and add TabView template (#6…
niels9001 Apr 8, 2026
6d3c0a0
Set DefaultContentDialogStyle on ContentDialog item template
niels9001 Apr 14, 2026
4861786
guideline for local build vsix package
Apr 16, 2026
bd83631
installation script for local built vsix
Apr 16, 2026
152f3b4
reveal the TabViewApp and NavigationApp templates
Apr 17, 2026
ba8011b
check dependent components
DinahK-2SO Apr 17, 2026
88b716d
refactoring the templates path 1
DinahK-2SO Apr 17, 2026
c1e21d0
refactoring the templates path 2; add test pipelines
DinahK-2SO Apr 17, 2026
0140a0b
the test pipeline stage
DinahK-2SO Apr 17, 2026
ed2687a
fix pipeline error
DinahK-2SO Apr 20, 2026
f619e83
fix error; enable pipeline failOnStderr
DinahK-2SO Apr 20, 2026
7e51419
inherit from VSIX/Directory.Build.props - fix pfx cert error in build…
DinahK-2SO Apr 21, 2026
1d82385
supporting files of mvvmapp
DinahK-2SO Apr 22, 2026
61741a1
fix configs causing dual csproj files in mvvmApp; set SortOrder among…
DinahK-2SO Apr 24, 2026
22eb33b
dotnet template 0.0.4-alpha
DinahK-2SO Apr 24, 2026
5a6b21b
Build-install localDev version (faster than component install); fix e…
DinahK-2SO Apr 28, 2026
043c2cb
Order of projects
DinahK-2SO Apr 29, 2026
2007494
Fix #6452: dotnet new winui-mvvm now creates Properties\PublishProfil…
DinahK-2SO May 6, 2026
b885268
Dotnet Templates: use winappCli 3.0.1 (Microsoft.Windows.SDK.BuildToo…
DinahK-2SO May 8, 2026
1f84505
[0.0.5-alpha] fix readme
DinahK-2SO May 8, 2026
095d31c
Merge branch 'main' of github.com:microsoft/WindowsAppSDK into user/m…
DinahK-2SO May 9, 2026
a9af7df
shared props
DinahK-2SO May 9, 2026
956276d
remove orphan code from dotnet templates folder
DinahK-2SO May 11, 2026
4826631
Share template manifest between VSIX and dotnet-new (#6476)
DinahK-2SO May 13, 2026
1e0290a
validate existence of manifest file path
DinahK-2SO May 13, 2026
c52b281
add templates into BuildAll.ps1
DinahK-2SO May 13, 2026
57d1732
utf-8 BOM
DinahK-2SO May 13, 2026
26f235a
cleanup SortOrder logic as it's implemented elsewhere
DinahK-2SO May 13, 2026
bc4a8dc
Rename single-project template folder to blank-app; drop 'single-proj…
DinahK-2SO May 14, 2026
50f0af9
Remove orphan item-page and item-usercontrol templates; drop redundan…
DinahK-2SO May 14, 2026
5881332
Remove AI agent instruction files and their docs/csproj references fr…
DinahK-2SO May 15, 2026
8648f82
add the missing support files
DinahK-2SO May 15, 2026
9684456
minor fix on document: readme, comment
DinahK-2SO May 15, 2026
5a406a8
Merge branch 'main' into user/muyuanli/dotnetnewtemplate
DinahK-2SO May 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ PublishScripts/
*.nupkg
# NuGet Symbol Packages
*.snupkg
# Visual Studio Extension build output (source files are *.vsixmanifest, not affected)
*.vsix
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
Expand Down
48 changes: 46 additions & 2 deletions BuildAll.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<#
<#
This script is to build the Foundation transport package that will be used to generate the windows app sdk package.
This script is called from BuildAll.ps1 from the aggregator repo and should not be called directly.

Expand Down Expand Up @@ -113,7 +113,7 @@ Try {
.\tools\GenerateDynamicDependencyOverrides.ps1 -Path "$buildOverridePath"
.\tools\GeneratePushNotificationsOverrides.ps1 -Path "$buildOverridePath"

if ($AzureBuildStep -ne "all")
if ($AzureBuildStep -ne "all" -and $AzureBuildStep -ne "BuildTemplates")
{
# Some builds have "-branchname" appended, but when this happens the environment variable
# TFS_BUILDNUMBER has the un-modified version.
Expand Down Expand Up @@ -601,6 +601,50 @@ Try {
exit 1
}
}
if (($AzureBuildStep -eq "all") -Or ($AzureBuildStep -eq "BuildTemplates"))
{
#------------------
# Build WinUI template artifacts:
# - dotnet-new NuGet (Microsoft.WindowsAppSDK.WinUI.CSharp.Templates.*.nupkg)
# - templates VSIX (Standalone + Component, x C# + C++ = 4 .vsix)
#
# All artifacts land in <repo>\localpackages\ so a single dev workflow
# (the docs, the csproj's <PackageOutputPath> default, the NuGet.config
# "localpackages" feed, and Test-DotnetNewTemplates.ps1) all agree on
# one path. .vsix files coexist fine; NuGet only sees *.nupkg.
#------------------
$templatesOutputDir = Join-Path $env:Build_SourcesDirectory "localpackages"
if (-not (Test-Path $templatesOutputDir))
{
New-Item -ItemType Directory -Path $templatesOutputDir -Force | Out-Null
}

write-host "Packing dotnet-new templates (Microsoft.WindowsAppSDK.WinUI.CSharp.Templates) ..."
& dotnet pack "dev\Templates\Dotnet\WinAppSdk.CSharp.DotnetNewTemplates.csproj" `
--configuration $Configuration `
--output $templatesOutputDir
if ($lastexitcode -ne 0)
{
write-host "ERROR: dotnet pack WinAppSdk.CSharp.DotnetNewTemplates.csproj FAILED."
exit 1
}

# Templates VSIX (Standalone + Component, matching CI). The
# Microsoft.WindowsAppSDK version used for restore comes from
# dev\Templates\Directory.Build.props (<WindowsAppSdkVersion> default)
# - single source of truth.
write-host "Building templates VSIX (Standalone + Component) ..."
& "dev\Templates\VSIX\build-local-VSIX-package\Build-VSIX.ps1" `
-Configuration $Configuration `
-Deployment Both `
-RepoRoot $env:Build_SourcesDirectory `
-OutputDir $templatesOutputDir
if ($lastexitcode -ne 0)
{
write-host "ERROR: Build-VSIX.ps1 FAILED."
exit 1
}
}
$files = Get-ChildItem $OutputDirectory -File -Filter "*.nupkg"
foreach ($file in $files)
{
Expand Down
22 changes: 11 additions & 11 deletions build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ steps:
- task: VSBuild@1
displayName: 'Restore WindowsAppSDK.Extension.sln'
inputs:
solution: $(FoundationRepoPath)dev\VSIX\WindowsAppSDK.Extension.sln
solution: $(FoundationRepoPath)dev\Templates\VSIX\WindowsAppSDK.Extension.sln
platform: 'Any CPU'
configuration: '$(buildConfiguration)'
msBuildArgs: '/t:restore /p:OptionalVSIXVersion="${{ parameters.OptionalVSIXVersion }}" /p:WindowsAppSDKVersion="$(WindowsAppSDKPackageVersion)" /p:RestoreAdditionalProjectSources="$(System.ArtifactsDirectory)" /p:EnableExperimentalVSIXFeatures="${{ parameters.EnableExperimentalVSIXFeatures }}" /binaryLogger:$(ob_outputDirectory)\binlogs\StandaloneVSIX.restore.binlog'

- task: VSBuild@1
displayName: 'Build Standalone WindowsAppSDK.Extension.sln'
inputs:
solution: $(FoundationRepoPath)dev\VSIX\WindowsAppSDK.Extension.sln
solution: $(FoundationRepoPath)dev\Templates\VSIX\WindowsAppSDK.Extension.sln
platform: 'Any CPU'
configuration: '$(buildConfiguration)'
msBuildArgs: '/p:OptionalVSIXVersion="${{ parameters.OptionalVSIXVersion }}" /p:WindowsAppSDKVersion="$(WindowsAppSDKPackageVersion)" /p:EnableExperimentalVSIXFeatures="${{ parameters.EnableExperimentalVSIXFeatures }}" /binaryLogger:$(ob_outputDirectory)\binlogs\StandaloneVSIX.build.binlog'
Expand All @@ -124,15 +124,15 @@ steps:
- task: VSBuild@1
displayName: 'Restore Component WindowsAppSDK.Extension.sln'
inputs:
solution: $(FoundationRepoPath)dev\VSIX\WindowsAppSDK.Extension.sln
solution: $(FoundationRepoPath)dev\Templates\VSIX\WindowsAppSDK.Extension.sln
platform: 'Any CPU'
configuration: '$(buildConfiguration)'
msBuildArgs: '/t:restore /p:OptionalVSIXVersion="${{ parameters.OptionalVSIXVersion }}" /p:WindowsAppSDKVersion="$(WindowsAppSDKPackageVersion)" /p:RestoreAdditionalProjectSources="$(System.ArtifactsDirectory)" /p:EnableExperimentalVSIXFeatures="${{ parameters.EnableExperimentalVSIXFeatures }}" /binaryLogger:$(ob_outputDirectory)\binlogs\ComponentVSIX.restore.binlog'

- task: VSBuild@1
displayName: 'Build Component WindowsAppSDK.Extension.sln'
inputs:
solution: $(FoundationRepoPath)dev\VSIX\WindowsAppSDK.Extension.sln
solution: $(FoundationRepoPath)dev\Templates\VSIX\WindowsAppSDK.Extension.sln
platform: 'Any CPU'
configuration: '$(buildConfiguration)'
msBuildArgs: '/restore /p:OptionalVSIXVersion="${{ parameters.OptionalVSIXVersion }}" /p:WindowsAppSDKVersion="$(WindowsAppSDKPackageVersion)" /p:EnableExperimentalVSIXFeatures="${{ parameters.EnableExperimentalVSIXFeatures }}" /p:Deployment="Component" /binaryLogger:$(ob_outputDirectory)\binlogs\ComponentVSIX.build.binlog'
Expand Down Expand Up @@ -165,7 +165,7 @@ steps:
- task: CopyFiles@2
displayName: 'Stage unsigned VSIX files for publishing'
inputs:
SourceFolder: '$(FoundationRepoPath)dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
SourceFolder: '$(FoundationRepoPath)dev\Templates\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
Contents: '**/WindowsAppSDK.*.vsix'
flattenFolders: true
TargetFolder: '$(ob_outputDirectory)\VSIX'
Expand All @@ -174,7 +174,7 @@ steps:
- task: CopyFiles@2
displayName: 'Stage unsigned VSIX files for signing'
inputs:
SourceFolder: '$(FoundationRepoPath)dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
SourceFolder: '$(FoundationRepoPath)dev\Templates\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
Contents: '**/WindowsAppSDK.*.vsix'
flattenFolders: true
TargetFolder: '$(Agent.TempDirectory)/UnsignedVSIX'
Expand All @@ -195,37 +195,37 @@ steps:

- template: ${{variables['System.DefaultWorkingDirectory']}}\AzurePipelinesTemplates\WindowsAppSDK-PublishSymbol-Steps.yml@WindowsAppSDKConfig
parameters:
SearchPattern: '$(FoundationRepoPath)dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)\**\WindowsAppSDK*.pdb'
SearchPattern: '$(FoundationRepoPath)dev\Templates\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)\**\WindowsAppSDK*.pdb'
IsOfficial: ${{ parameters.IsOfficial }}

- task: CopyFiles@2
displayName: 'Stage VSIX component JSONs'
inputs:
SourceFolder: '$(FoundationRepoPath)dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
SourceFolder: '$(FoundationRepoPath)dev\Templates\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
Contents: '**/WindowsAppSDK*.pdb'
flattenFolders: true
TargetFolder: '$(ob_outputDirectory)\symbols'

- task: CopyFiles@2
displayName: 'Stage VSIX component JSONs'
inputs:
SourceFolder: '$(FoundationRepoPath)dev\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
SourceFolder: '$(FoundationRepoPath)dev\Templates\VSIX\BuildOutput\obj\AnyCPU$(buildConfiguration)'
Contents: '**/WindowsAppSDK.*.Component.json'
flattenFolders: true
TargetFolder: '$(ob_outputDirectory)'

- task: CopyFiles@2
displayName: 'Stage VSIX manifest'
inputs:
SourceFolder: '$(FoundationRepoPath)dev\VSIX'
SourceFolder: '$(FoundationRepoPath)dev\Templates\VSIX'
Contents: 'extension.manifest.json'
flattenFolders: true
TargetFolder: '$(ob_outputDirectory)'

- task: CopyFiles@2
displayName: 'Stage VSIX overview markdown'
inputs:
SourceFolder: '$(FoundationRepoPath)dev\VSIX'
SourceFolder: '$(FoundationRepoPath)dev\Templates\VSIX'
Contents: 'overview.md'
flattenFolders: true
TargetFolder: '$(ob_outputDirectory)'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
parameters:
- name: pool
type: object
default:
vmImage: 'windows-latest'
- name: dependsOnStage
type: string
default: 'DotnetNewTemplates_Build'

stages:
- stage: DotnetNewTemplates_Publish
displayName: 'Publish dotnet new templates to NuGet.org'
dependsOn:
- ${{ parameters.dependsOnStage }}
jobs:
- job: PublishNuGetOrg
displayName: 'Publish dotnet new template pack to NuGet.org'
pool: ${{ parameters.pool }}
variables:
ob_outputDirectory: '$(Pipeline.Workspace)\drop_DotnetNewTemplates_Build_PackDotnetNewTemplates'
ob_artifactBaseName: 'dotnet-new-template-pack'
dotnetTemplatesArtifactPath: '$(Pipeline.Workspace)\drop_DotnetNewTemplates_Build_PackDotnetNewTemplates'
steps:
- checkout: self

- download: current
displayName: 'Download dotnet new template pack artifact'
artifact: 'drop_DotnetNewTemplates_Build_PackDotnetNewTemplates'

- task: PowerShell@2
displayName: 'Verify dotnet new template pack artifact exists'
inputs:
targetType: inline
script: |
$artifactPath = '$(dotnetTemplatesArtifactPath)'
if (-not (Test-Path $artifactPath)) {
throw "Expected artifact directory '$artifactPath' was not found in the downloaded drop artifact."
}
$packages = Get-ChildItem -Path $artifactPath -Filter *.nupkg -File -Recurse
if (-not $packages) {
throw "No .nupkg files were found under '$artifactPath'."
}
Write-Host "Found the following packages ready for publish:"
$packages | ForEach-Object { Write-Host " - $($_.FullName)" }

- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'Publish dotnet new templates to NuGet.org'
inputs:
command: 'push'
packagesToPush: '$(dotnetTemplatesArtifactPath)\*.nupkg'
verbosityPush: 'Detailed'
nuGetFeedType: 'external'
publishFeedCredentials: 'NugetOrg'
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
parameters:
- name: pool
type: object
default:
vmImage: 'windows-latest'
- name: sourceSubdirectory
type: string
default: 'WindowsAppSDK'
- name: publishToInternalFeed
type: boolean
default: true
- name: SignOutput
type: boolean
default: false

stages:
- stage: DotnetNewTemplates_Build
displayName: 'Build and pack dotnet new templates'
dependsOn: []
jobs:
- job: PackDotnetNewTemplates
displayName: 'Pack dotnet new template NuGet'
dependsOn: []
pool: ${{ parameters.pool }}
variables:
ob_outputDirectory: '$(Build.ArtifactStagingDirectory)\dotnet-new-template-pack'
templateProjectDir: '$(Build.SourcesDirectory)\${{ parameters.sourceSubdirectory }}\dev\Templates\Dotnet'
steps:
- checkout: self

- task: PowerShell@2
displayName: 'Ensure test certificate for signing'
inputs:
targetType: inline
workingDirectory: '$(Build.SourcesDirectory)\${{ parameters.sourceSubdirectory }}'
script: |
$repoRoot = "$(Build.SourcesDirectory)\${{ parameters.sourceSubdirectory }}"
$userDir = Join-Path $repoRoot '.user'
$pfxPath = Join-Path $userDir 'winappsdk.certificate.test.pfx'
$pwdPath = Join-Path $userDir 'winappsdk.certificate.test.pwd'

if (-not (Test-Path $userDir)) {
New-Item -ItemType Directory -Path $userDir | Out-Null
}

if ((Test-Path $pfxPath) -and (Test-Path $pwdPath)) {
Write-Host "Test certificate already exists at $pfxPath"
}
else {
$password = [Guid]::NewGuid().ToString()
$securePwd = ConvertTo-SecureString -String $password -Force -AsPlainText
$subject = 'CN=WindowsAppSDK Test Certificate'
$cert = New-SelfSignedCertificate -Type CodeSigningCert -Subject $subject -KeyExportPolicy Exportable -KeyAlgorithm RSA -KeyLength 2048 -CertStoreLocation 'Cert:\CurrentUser\My'
Export-PfxCertificate -Cert $cert -FilePath $pfxPath -Password $securePwd | Out-Null
Set-Content -Path $pwdPath -Value $password -NoNewline
Write-Host "Created test certificate at $pfxPath"
}

- task: UseDotNet@2
displayName: 'Use .NET SDK'
inputs:
packageType: sdk
version: '8.0.x'

- task: PowerShell@2
displayName: 'Verify template csproj exists before restore'
inputs:
targetType: inline
workingDirectory: '$(templateProjectDir)'
script: |
Write-Host "Current directory: $(Get-Location)"
$projectPath = Join-Path (Get-Location) 'WinAppSdk.CSharp.DotnetNewTemplates.csproj'
if (-not (Test-Path $projectPath)) {
throw "Template project missing at $projectPath"
}
Write-Host "Confirmed template project at $projectPath"

- task: DotNetCoreCLI@2
displayName: 'Restore template project'
inputs:
command: 'restore'
projects: '$(templateProjectDir)\WinAppSdk.CSharp.DotnetNewTemplates.csproj'
workingDirectory: '$(templateProjectDir)'

- task: DotNetCoreCLI@2
displayName: 'Pack dotnet new templates'
inputs:
command: 'pack'
packagesToPack: '$(templateProjectDir)\WinAppSdk.CSharp.DotnetNewTemplates.csproj'
arguments: '--configuration Release --no-restore --no-build /p:WindowsAppSDKBuildPipeline=1'
outputDir: '$(ob_outputDirectory)'
workingDirectory: '$(templateProjectDir)'

- ${{ if eq(parameters.SignOutput, true) }}:
- template: AzurePipelinesTemplates/WindowsAppSDK-EsrpCodeSigning-Steps.yml@WindowsAppSDKConfig
parameters:
FolderPath: '$(ob_outputDirectory)'
Pattern: '*.nupkg'
KeyCode: 'CP-401405'
UseMinimatch: true

- task: 333b11bd-d341-40d9-afcf-b32d5ce6f23b@2
displayName: 'Publish dotnet template pack to internal feed'
condition: and(succeeded(), eq('${{ parameters.publishToInternalFeed }}', 'true'))
inputs:
command: 'push'
packagesToPush: '$(ob_outputDirectory)\*.nupkg'
verbosityPush: 'Detailed'
nuGetFeedType: 'internal'
publishVstsFeed: 'ProjectReunion/Project.Reunion.nuget.internal'
allowPackageConflicts: true


Loading