diff --git a/.gitignore b/.gitignore index 479e37e613..50cb25bb4e 100644 --- a/.gitignore +++ b/.gitignore @@ -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. diff --git a/BuildAll.ps1 b/BuildAll.ps1 index 2a56b98c35..6dbc0285dd 100644 --- a/BuildAll.ps1 +++ b/BuildAll.ps1 @@ -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. @@ -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. @@ -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 \localpackages\ so a single dev workflow + # (the docs, the csproj's 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 ( 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) { diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml index 2e90d4002d..8ba3ecca76 100644 --- a/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-BuildVSIX-Steps.yml @@ -90,7 +90,7 @@ 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' @@ -98,7 +98,7 @@ steps: - 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' @@ -124,7 +124,7 @@ 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' @@ -132,7 +132,7 @@ steps: - 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' @@ -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' @@ -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' @@ -195,13 +195,13 @@ 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' @@ -209,7 +209,7 @@ steps: - 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)' @@ -217,7 +217,7 @@ steps: - 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)' @@ -225,7 +225,7 @@ steps: - 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)' diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Publish-Stage.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Publish-Stage.yml new file mode 100644 index 0000000000..afd8fe1d3b --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Publish-Stage.yml @@ -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' diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Stages.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Stages.yml new file mode 100644 index 0000000000..5067844f4f --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Stages.yml @@ -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 + + diff --git a/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Test-Stage.yml b/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Test-Stage.yml new file mode 100644 index 0000000000..2b88af3441 --- /dev/null +++ b/build/AzurePipelinesTemplates/WindowsAppSDK-DotnetNewTemplates-Test-Stage.yml @@ -0,0 +1,74 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# Stage template: Smoke-test dotnet new templates by scaffolding and building +# each C# project template and all item templates. +# +# This stage runs after DotnetNewTemplates_Build in the main build pipeline +# (WindowsAppSDK-DotnetNewTemplates.yml). It downloads the .nupkg artifact +# produced by the build stage and passes it to Test-DotnetNewTemplates.ps1. + +parameters: +- name: pool + type: object + default: + vmImage: 'windows-latest' +- name: sourceSubdirectory + type: string + default: 'WindowsAppSDK' +- name: dependsOnStage + type: string + default: 'DotnetNewTemplates_Build' +- name: platforms + type: object + default: + - x64 +- name: dotnetSdkVersion + type: string + default: '8.0.x' + +stages: +- stage: DotnetNewTemplates_Test + displayName: 'Smoke-test dotnet new templates' + dependsOn: + - ${{ parameters.dependsOnStage }} + jobs: + - job: TestDotnetNewTemplates + displayName: 'Scaffold and build dotnet new templates' + pool: ${{ parameters.pool }} + timeoutInMinutes: 60 + variables: + ob_outputDirectory: '$(Build.ArtifactStagingDirectory)\test-results' + templateArtifactDir: '$(Pipeline.Workspace)\drop_DotnetNewTemplates_Build_PackDotnetNewTemplates' + steps: + - checkout: self + + - download: current + displayName: 'Download template pack artifact' + artifact: 'drop_DotnetNewTemplates_Build_PackDotnetNewTemplates' + + - task: UseDotNet@2 + displayName: 'Use .NET SDK ${{ parameters.dotnetSdkVersion }}' + inputs: + packageType: sdk + version: '${{ parameters.dotnetSdkVersion }}' + + - task: NuGetAuthenticate@1 + displayName: 'Authenticate NuGet feeds' + + - task: PowerShell@2 + displayName: 'Run template smoke tests' + inputs: + targetType: inline + workingDirectory: '$(Build.SourcesDirectory)\${{ parameters.sourceSubdirectory }}' + script: | + $package = Get-ChildItem -Path '$(templateArtifactDir)' -Filter 'Microsoft.WindowsAppSDK*.nupkg' -Recurse | Select-Object -First 1 + if (-not $package) { + throw "No template .nupkg found under '$(templateArtifactDir)'" + } + Write-Host "Using template package: $($package.FullName)" + $platforms = '${{ join(',', parameters.platforms) }}' -split ',' + & '$(Build.SourcesDirectory)\${{ parameters.sourceSubdirectory }}\dev\Templates\Dotnet\Test-DotnetNewTemplates.ps1' ` + -PackagePath $package.FullName ` + -Platforms $platforms ` + -SkipAppLaunch diff --git a/build/WindowsAppSDK-DotnetNewTemplates-Publish.yml b/build/WindowsAppSDK-DotnetNewTemplates-Publish.yml new file mode 100644 index 0000000000..8a155ae0aa --- /dev/null +++ b/build/WindowsAppSDK-DotnetNewTemplates-Publish.yml @@ -0,0 +1,100 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# Standalone (non-OneBranch) pipeline for publishing dotnet new templates to NuGet.org. +# This pipeline is separate from the OneBranch build pipeline because OneBranch agents +# block outbound internet access, which prevents pushing packages to NuGet.org. +# +# Usage: +# 1. Run the OneBranch build pipeline (WindowsAppSDK-DotnetNewTemplates.yml) first. +# 2. Note the build ID from that run. +# 3. Run this pipeline, providing the build ID as a parameter. + +trigger: none + +parameters: +- name: "BuildPipelineId" + displayName: "Build pipeline definition ID (from WindowsAppSDK-DotnetNewTemplates pipeline)" + type: number + default: 186691 +- name: "BuildRunId" + displayName: "Build run ID to download artifact from" + type: number +- name: "ArtifactName" + displayName: "Artifact name from the build pipeline" + type: string + default: 'drop_DotnetNewTemplates_Build_PackDotnetNewTemplates' + +variables: +- template: WindowsAppSDK-CommonVariables.yml + +pool: + vmImage: 'windows-latest' + +stages: +- stage: DotnetNewTemplates_Approval + displayName: 'Approve NuGet.org publish' + jobs: + - job: WaitForPublishApproval + displayName: 'Manual Approval' + pool: server + timeoutInMinutes: 1440 + steps: + - task: ManualValidation@0 + displayName: 'Verify artifacts before NuGet.org publish' + timeoutInMinutes: 1440 + inputs: + notifyUsers: '' + instructions: | + Please verify the .nupkg in the ${{ parameters.ArtifactName }} folder before continuing the publish to NuGet.org: + https://dev.azure.com/microsoft/ProjectReunion/_build/results?buildId=${{ parameters.BuildRunId }}&view=artifacts&pathAsName=false&type=publishedArtifacts + +- stage: DotnetNewTemplates_Publish + displayName: 'Publish dotnet new templates to NuGet.org' + dependsOn: + - DotnetNewTemplates_Approval + jobs: + - job: PublishNuGetOrg + displayName: 'Publish dotnet new template pack to NuGet.org' + pool: + vmImage: 'windows-latest' + variables: + dotnetTemplatesArtifactPath: '$(Pipeline.Workspace)\BuildArtifact' + steps: + - checkout: none + + - task: DownloadPipelineArtifact@2 + displayName: 'Download dotnet new template pack artifact' + inputs: + source: 'specific' + project: '$(System.TeamProjectId)' + pipeline: ${{ parameters.BuildPipelineId }} + runVersion: 'specific' + runId: ${{ parameters.BuildRunId }} + artifact: '${{ parameters.ArtifactName }}' + targetPath: '$(dotnetTemplatesArtifactPath)' + + - 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." + } + $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' diff --git a/build/WindowsAppSDK-DotnetNewTemplates.yml b/build/WindowsAppSDK-DotnetNewTemplates.yml new file mode 100644 index 0000000000..537db0d703 --- /dev/null +++ b/build/WindowsAppSDK-DotnetNewTemplates.yml @@ -0,0 +1,124 @@ +##################################################################################################################################### +# OneBranch Pipelines - Official # +##################################################################################################################################### +# # +# This pipeline was created by EasyStart from a sample located at: # +# https://aka.ms/obpipelines/easystart/samples # +# # +# Windows Undocked Wiki: https://www.osgwiki.com/wiki/Windows_Undocked_Template # +# General OB Documentation: https://aka.ms/obpipelines # +# Build MSBuild project: https://dev.azure.com/onebranch/OneBranch/_wiki/wikis/OneBranch.wiki/6045/Build-MSBuild-project # +# Yaml Schema: https://aka.ms/obpipelines/yaml/schema # +# Retail Tasks: https://aka.ms/obpipelines/tasks # +# Support: https://aka.ms/onebranchsup # +# # +##################################################################################################################################### + +name: $(version) + +# https://aka.ms/obpipelines/triggers +trigger: none + +parameters: +- name: "PublishDotnetNewTemplatesToInternalFeed" + displayName: "Publish dotnet new templates to internal feed" + type: boolean + default: false +- name: "SignOutput" + displayName: "Sign the NuGet package with ESRP" + type: boolean + default: true +variables: +- template: AzurePipelinesTemplates\WindowsAppSDK-Versions.yml@WindowsAppSDKVersionConfig +- template: WindowsAppSDK-CommonVariables.yml + +resources: + repositories: + - repository: templates + type: git + name: OneBranch.Pipelines/GovernedTemplates + ref: refs/heads/main + - repository: WindowsAppSDKConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + - repository: WindowsAppSDKVersionConfig + type: git + name: ProjectReunion/WindowsAppSDKConfig + ref: refs/heads/main + +extends: + template: v2/Microsoft.NonOfficial.yml@templates # https://aka.ms/obpipelines/templates + parameters: + featureFlags: + EnableCDPxPAT: false + WindowsHostVersion: + Version: 2022 + Network: R1 + + platform: + name: 'windows_undocked' # windows undocked + + cloudvault: # Please refer the wiki for more information: https://aka.ms/obpipelines/cloudvault + enabled: false + + globalSdl: # Refer the wiki for more options in this parameter: https://aka.ms/obpipelines/sdl + tsa: + enabled: $(TsaEnabled) # onebranch publish all sdl results to TSA. If TSA is disabled all SDL tools will forced into 'break' build mode. Please provide TSAOptions.json. + isNativeCode: false #TODO turn back on when bug in CheckCFlags2.exe is fixed + suppression: + suppressionFile: $(Build.SourcesDirectory)\.gdn\OneBranch.gdnsuppress + asyncSdl: # https://aka.ms/obpipelines/asyncsdl + enabled: false + psscriptanalyzer: + enable: true + break: true + tsandjs: + enabled: true + break: true + python: + enabled: true + break: true + credscan: + enable: true + break: true + policheck: + enable: true + break: true + binskim: + enabled: true + break: true + analyzeTargetGlob: $(BinskimExclusionForFoundationRepo) + prefast: + enabled: false + break: true + logRootDirectory: '$(Build.SourcesDirectory)' + # Use "severity: 'Warning'" to be more sensitive, break on Warnings+Errors. + # Use "severity: 'Note'" to be even more sensitive, break on Notes+Warnings+Errors. + # Use "severity: 'Default'" to get back to default, i.e., break on Errors. Can't get less sensitive than that. + severity: Default + # Use "exclusionsFile: <>" to apply a local exclusion file. + apiscan: + # We will enable APIScan on a per-job basis downstream as needed. + enabled: false + # TODO: Once we've cleared away all existing errors, consider setting this to true. + break: false + + stages: + - template: AzurePipelinesTemplates\WindowsAppSDK-DotnetNewTemplates-Stages.yml@self + parameters: + pool: + type: windows + publishToInternalFeed: ${{ parameters.PublishDotnetNewTemplatesToInternalFeed }} + SignOutput: ${{ parameters.SignOutput }} + + - template: AzurePipelinesTemplates\WindowsAppSDK-DotnetNewTemplates-Test-Stage.yml@self + parameters: + pool: + type: windows + dependsOnStage: 'DotnetNewTemplates_Build' + + # NuGet.org publishing is handled by the separate non-OneBranch pipeline: + # WindowsAppSDK-DotnetNewTemplates-Publish.yml + # OneBranch agents block outbound internet, so a standalone pipeline with + # standard Azure-hosted agents is used for the NuGet.org push. diff --git a/build/WindowsAppSDK-TDBuild.yml b/build/WindowsAppSDK-TDBuild.yml index e38ddc7856..f7a82fb963 100644 --- a/build/WindowsAppSDK-TDBuild.yml +++ b/build/WindowsAppSDK-TDBuild.yml @@ -22,7 +22,7 @@ jobs: parameters: GitAction: ${{ parameters.GitAction }} ResourceFilePath: | - dev\VSIX\Extension\Cpp\Common\VSPackage.resx - dev\VSIX\Extension\Cs\Common\VSPackage.resx + dev\Templates\VSIX\Extension\Cpp\Common\VSPackage.resx + dev\Templates\VSIX\Extension\Cs\Common\VSPackage.resx dev\Interop\StoragePickers\Strings\StoragePickers.resw teamId: $(TdBuildTeamIDVSIX) diff --git a/dev/Templates/Directory.Build.props b/dev/Templates/Directory.Build.props new file mode 100644 index 0000000000..e8f8c87f61 --- /dev/null +++ b/dev/Templates/Directory.Build.props @@ -0,0 +1,37 @@ + + + + + + + 2.0.230706.1 + 10.0.26100.4654 + 1.0.220914.1 + + 1.0.0-preview1 + Standalone + + true + + + false + + + + + $(MSBuildThisFileDirectory)..\..\ + $(MSBuildThisFileDirectory)Source\ + $(TemplateSourceDir)ItemTemplates\ + $(TemplateSourceDir)ProjectTemplates\ + + diff --git a/dev/Templates/Dotnet/Directory.Build.props b/dev/Templates/Dotnet/Directory.Build.props new file mode 100644 index 0000000000..1125e90889 --- /dev/null +++ b/dev/Templates/Dotnet/Directory.Build.props @@ -0,0 +1,5 @@ + + + + + diff --git a/dev/Templates/Dotnet/README.md b/dev/Templates/Dotnet/README.md new file mode 100644 index 0000000000..3a6e849451 --- /dev/null +++ b/dev/Templates/Dotnet/README.md @@ -0,0 +1,160 @@ +# Windows App SDK WinUI 3 C# Templates + +Official WinUI 3 project and item templates for the +[Windows App SDK](https://learn.microsoft.com/windows/apps/windows-app-sdk/), +designed for use with the .NET CLI (`dotnet new`). This template pack provides +the same starting points available in Visual Studio — blank apps, navigation +views, MVVM scaffolding, tab-view shells, class libraries, unit test projects, +and common WinUI UI items — right from the command line. + +`dotnet run` launches the generated app with full MSIX package identity, so +features that require it (notifications, background tasks, Windows AI APIs, +etc.) work the same as they would in a Visual Studio F5 deploy. + +## Installation + +```shell +dotnet new install Microsoft.WindowsAppSDK.WinUI.CSharp.Templates +``` + +## Available Templates + +### Project Templates + +Get below list via `dotnet new list winui` + +| Short Name | Description | +|-------------------|--------------------------------------------------------------------------| +| `winui` | Minimal WinUI 3 blank app with MSIX packaging. Start here if unsure | +| `winui-mvvm` | WinUI 3 MVVM app using `CommunityToolkit.Mvvm` | +| `winui-navview` | WinUI 3 NavigationView starter app with MSIX packaging | +| `winui-tabview` | WinUI 3 TabView starter app with MSIX packaging | +| `winui-lib` | WinUI 3 class library for sharing UI components | +| `winui-unittest` | WinUI 3 packaged test app configured for MSTest | + +Each `winui-*` short name also has a `winui3-*` alias (e.g. `winui3-mvvm`). + +### Item Templates + +| Short Name | Description | +|----------------------------|----------------------------------------------------------| +| `winui-page` | WinUI 3 Page (XAML + code-behind) | +| `winui-window` | WinUI 3 Window (XAML + code-behind) | +| `winui-usercontrol` | WinUI 3 UserControl (XAML + code-behind) | +| `winui-templatedcontrol` | WinUI 3 templated control | +| `winui-resourcedictionary` | WinUI 3 ResourceDictionary | +| `winui-resw` | RESW resources file for localized strings | +| `winui-dialog` | WinUI 3 ContentDialog (XAML + code-behind) | + +Item templates are context-aware and only surface when `dotnet new` is executed +inside a WinUI project folder or when `--project` points to one. + +## Quick Start + +### Quickstart a new WinUI 3 APP + +```powershell +dotnet new winui -n MyApp +cd MyApp + +# dotnet build +dotnet run +``` + +`dotnet run` registers a loose-layout MSIX, gives the app package identity, +and launches it via AUMID activation — equivalent to F5 in Visual Studio. + +### Add items to an existing project + +```powershell +dotnet new winui-page -n SettingsPage --project .\MyApp.csproj +dotnet new winui-usercontrol -n ProfileCard --project .\MyApp.csproj +dotnet new winui-window -n SecondaryWindow --project .\MyApp.csproj +dotnet new winui-dialog -n ConfirmDialog --project .\MyApp.csproj +``` + +### Choosing a Target Framework + +Generated projects target `net{N}.0-windows10.0.26100.0`, where `{N}` is +selected at scaffold time via `--dotnet-version`: + +```shell +dotnet new winui --dotnet-version net8.0 -n MyApp +dotnet new winui --dotnet-version net9.0 -n MyApp +dotnet new winui --dotnet-version net10.0 -n MyApp +``` + +Supported choices: `net8.0`, `net9.0`, `net10.0`. If you omit +`--dotnet-version`, most templates default to `net10.0`; `winui-mvvm` matches +your installed .NET SDK. You can also edit `` in the +generated `.csproj` afterward. + +### Customizing `dotnet run` behavior + +Set any of these MSBuild properties inside a `` in the +generated `.csproj` to tweak how `dotnet run` launches the app: + +| Property | Default | Effect | +|--------------------------------|---------|------------------------------------------------------------------------------------------------| +| `EnableWinAppRunSupport` | `true` | Set to `false` to disable the packaged-launch integration and run unpackaged instead | +| `WinAppRunUseExecutionAlias` | `false` | For console apps — launches via `uap5:ExecutionAlias` so stdin/stdout stay in the terminal | +| `WinAppRunNoLaunch` | `false` | Register the package but don't launch (useful when attaching a different debugger first) | +| `WinAppRunDebugOutput` | `false` | Capture `OutputDebugString` and crash dumps; cannot be combined with another debugger | +| `WinAppLaunchArgs` | (empty) | Arguments passed to the app on launch (e.g. `--my-flag value`) | + +These properties are provided by the +[`Microsoft.Windows.SDK.BuildTools.WinApp`](https://www.nuget.org/packages/Microsoft.Windows.SDK.BuildTools.WinApp) +NuGet package, which is referenced automatically by the project templates. + +## Prerequisites + +- [.NET SDK](https://dotnet.microsoft.com/download) — `net8.0`, `net9.0`, or `net10.0` +- Windows 10 version 1809 (build 17763) or later +- **Developer Mode enabled** — required for `dotnet run` to register the loose-layout package. + Settings → System → For developers → Developer Mode → On. + +## Resources + +- [Windows App SDK documentation](https://learn.microsoft.com/windows/apps/windows-app-sdk/) +- [WinUI 3 documentation](https://learn.microsoft.com/windows/apps/winui/winui3/) +- [Release notes](https://github.com/microsoft/WindowsAppSDK/releases) +- [File an issue](https://github.com/microsoft/WindowsAppSDK/issues) + +## Contributing + +This template pack is built from the +[WindowsAppSDK](https://github.com/microsoft/WindowsAppSDK) repository under +`dev/Templates/Dotnet/`. The templates share the same XAML, code-behind, +and project files as the Visual Studio templates under +`dev/Templates/Source/ProjectTemplates/` and +`dev/Templates/Source/ItemTemplates/`, so there is only one copy to maintain. + +### Local Testing + +1. Pack the templates: + ```shell + dotnet pack dev/Templates/Dotnet/WinAppSdk.CSharp.DotnetNewTemplates.csproj -c Release -o localpackages + ``` +2. Uninstall any previous version: + ```shell + dotnet new uninstall Microsoft.WindowsAppSDK.WinUI.CSharp.Templates + ``` +3. Install the local package: + ```shell + dotnet new install ./localpackages/Microsoft.WindowsAppSDK.WinUI.CSharp.Templates..nupkg + ``` + +For an automated end-to-end run that scaffolds, builds, and (optionally) +launches every template, use the included script: + +```powershell +.\dev\Templates\Dotnet\Test-DotnetNewTemplates.ps1 # full run +.\dev\Templates\Dotnet\Test-DotnetNewTemplates.ps1 -SkipAppLaunch # CI-friendly +``` + +### Validation Checklist + +- Run `dotnet pack` locally and `dotnet new install` to verify the local build. +- Run `dotnet new list winui` to review and confirm all templates are registered. +- Build generated projects for x64, x86, and ARM64 in Visual Studio or `dotnet build`. +- Test packaged deployments on Windows 10 version 1809 or later. diff --git a/dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 b/dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 new file mode 100644 index 0000000000..4eb1810e73 --- /dev/null +++ b/dev/Templates/Dotnet/Test-DotnetNewTemplates.ps1 @@ -0,0 +1,488 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. + +<#+ +.SYNOPSIS +Validates the WinUI 3 dotnet new template pack end-to-end. + +.DESCRIPTION +Builds (or consumes) the template NuGet package, reinstalls it locally, and +scaffolds every WinUI 3 project and item template. Each generated project is +built, and app templates are optionally launched via dotnet run using the +recommended WinAppSDK self-contained properties. + +.PARAMETER PackagePath +Path to an existing Microsoft.WindowsAppSDK.WinUI.CSharp.Templates .nupkg. When +omitted, the script runs dotnet pack to create a package under -PackOutputDirectory. + +.PARAMETER Configuration +MSBuild configuration used for dotnet pack (default: Release). + +.PARAMETER PackOutputDirectory +Directory (relative to the repo root or absolute) where dotnet pack should emit +the .nupkg (default: localpackages). + +.PARAMETER Platforms +One or more MSBuild Platform values to validate for each template (default: x64). + +.PARAMETER SkipAppLaunch +Skips launching the generated WinUI apps at the end of the run. Builds still +occur. + +.PARAMETER RunTimeoutSeconds +If greater than zero, any WinUI apps launched at the end of the run are +automatically closed after the specified number of seconds. A value of 0 keeps +them open until you close each window manually (default). + +.PARAMETER KeepWorkingDirectory +Preserves the temporary scaffolding directory instead of deleting it. + +.EXAMPLE +PS> ./Test-DotnetNewTemplates.ps1 + +Builds the template pack, installs it, scaffolds every template, and runs app +templates for x64. + +.EXAMPLE +PS> ./Test-DotnetNewTemplates.ps1 -PackagePath C:/tmp/Templates.nupkg -Platforms x64,arm64 -SkipAppLaunch + +Installs the provided package and validates builds for both x64 and arm64 +without launching the apps. +#> +[CmdletBinding()] +param( + [Parameter()] + [string]$PackagePath, + + [Parameter()] + [string]$Configuration = 'Release', + + [Parameter()] + [string]$PackOutputDirectory = 'localpackages', + + [Parameter()] + [string[]]$Platforms = @('x64'), + + [Parameter()] + [switch]$SkipAppLaunch, + + [Parameter()] + [int]$RunTimeoutSeconds = 0, + + [Parameter()] + [switch]$KeepWorkingDirectory +) + +Set-StrictMode -Version 2.0 +$ErrorActionPreference = 'Stop' + +$script:exitCode = 0 +$results = New-Object System.Collections.Generic.List[object] +$appExecutables = New-Object System.Collections.Generic.List[object] +$dotnetPath = (Get-Command dotnet -ErrorAction Stop).Source +$workingRoot = $null +$originalNugetPackages = $env:NUGET_PACKAGES + +function Write-Step { + param([string]$Message) + Write-Host "`n>> $Message" -ForegroundColor Cyan +} + +function Add-Result { + param( + [string]$Template, + [string]$Platform, + [string]$Step, + [string]$Status, + [string]$Path + ) + + $results.Add([pscustomobject]@{ + Template = $Template + Platform = $Platform + Step = $Step + Status = $Status + Path = $Path + }) | Out-Null +} + +function Invoke-DotnetCommand { + param( + [string[]]$Arguments, + [string]$WorkingDirectory, + [string]$Description, + [switch]$CaptureOutput + ) + + $display = "dotnet {0}" -f ($Arguments -join ' ') + Write-Step "$display ($Description)" + + Push-Location -Path $WorkingDirectory + try { + # Temporarily allow stderr from native commands to avoid treating + # non-fatal messages (e.g. dotnet template update checks) as + # terminating errors. Real failures are caught via $LASTEXITCODE. + $savedEAP = $ErrorActionPreference + $ErrorActionPreference = 'Continue' + if ($CaptureOutput.IsPresent) { + $output = & $dotnetPath @Arguments 2>&1 + } + else { + & $dotnetPath @Arguments 2>&1 | ForEach-Object { Write-Host $_ } + } + $exitCode = $LASTEXITCODE + } + finally { + $ErrorActionPreference = $savedEAP + Pop-Location + } + + if ($exitCode -ne 0) { + throw "dotnet $Description failed with exit code $exitCode" + } + + if ($CaptureOutput.IsPresent) { + return $output + } +} + +function Get-TemplatePackagePath { + param( + [string]$PackagePathOverride, + [string]$ProjectPath, + [string]$Configuration, + [string]$PackOutputDirectory, + [string]$RepoRoot + ) + + if ($PackagePathOverride) { + if (-not (Test-Path -Path $PackagePathOverride -PathType Leaf)) { + throw "PackagePath '$PackagePathOverride' does not exist." + } + return (Resolve-Path -Path $PackagePathOverride).Path + } + + $packOutput = if ([System.IO.Path]::IsPathRooted($PackOutputDirectory)) { + $PackOutputDirectory + } + else { + Join-Path -Path $RepoRoot -ChildPath $PackOutputDirectory + } + + if (-not (Test-Path -Path $packOutput)) { + Write-Step "Creating pack output directory '$packOutput'" + New-Item -ItemType Directory -Path $packOutput -Force | Out-Null + } + + Invoke-DotnetCommand -Arguments @('pack', $ProjectPath, '-c', $Configuration, '-o', $packOutput) -WorkingDirectory $RepoRoot -Description "pack template project" + + $package = Get-ChildItem -Path $packOutput -Filter 'Microsoft.WindowsAppSDK*.nupkg' | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + if (-not $package) { + throw "No template package was produced in '$packOutput'." + } + return $package.FullName +} + +function Remove-TemplatePackIfPresent { + param([string]$RepoRoot) + + try { + Invoke-DotnetCommand -Arguments @('new', 'uninstall', 'Microsoft.WindowsAppSDK.WinUI.CSharp.Templates') -WorkingDirectory $RepoRoot -Description 'uninstall existing template pack' + } + catch { + Write-Step 'Template pack uninstall reported no installed instances; continuing.' + } +} + +function Install-TemplatePack { + param( + [string]$RepoRoot, + [string]$PackageToInstall + ) + + Remove-StaleTemplateEnginePackage -PackagePath $PackageToInstall + Invoke-DotnetCommand -Arguments @('new', 'install', $PackageToInstall) -WorkingDirectory $RepoRoot -Description 'install template pack' +} + +function Remove-StaleTemplateEnginePackage { + param([string]$PackagePath) + + $packageFileName = [System.IO.Path]::GetFileName($PackagePath) + $templateEngineDir = Join-Path -Path $env:USERPROFILE -ChildPath '.templateengine\packages' + if (-not (Test-Path -Path $templateEngineDir -PathType Container)) { + return + } + + $cachedPackage = Join-Path -Path $templateEngineDir -ChildPath $packageFileName + if (Test-Path -Path $cachedPackage -PathType Leaf) { + Write-Step "Removing cached template package '$cachedPackage'" + Remove-Item -Path $cachedPackage -Force + } +} + +function Get-AppExecutablePath { + param( + [string]$ProjectPath, + [string]$ProjectName + ) + + $binFolder = Join-Path -Path $ProjectPath -ChildPath 'bin' + if (-not (Test-Path -Path $binFolder -PathType Container)) { + return $null + } + + $exe = Get-ChildItem -Path $binFolder -Filter "$ProjectName.exe" -Recurse -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + if ($exe) { + return $exe.FullName + } + return $null +} + +function Launch-AppExecutables { + param([int]$TimeoutSeconds) + + if ($appExecutables.Count -eq 0) { + Write-Step 'No WinUI executables were recorded for launch.' + return + } + + Write-Step 'Launching WinUI apps for manual validation...' + foreach ($entry in $appExecutables) { + Write-Host "Launching $($entry.Template) ($($entry.Platform)) -> $($entry.Path)" -ForegroundColor Yellow + try { + $process = Start-Process -FilePath $entry.Path -PassThru -WindowStyle Normal + if ($TimeoutSeconds -gt 0) { + $exited = $process.WaitForExit($TimeoutSeconds * 1000) + if (-not $exited) { + Write-Warning "App '$($entry.Path)' is still running after $TimeoutSeconds seconds; terminating process." + $process.Kill() + } + elseif ($process.ExitCode -ne 0) { + Write-Warning "App '$($entry.Path)' exited with code $($process.ExitCode)." + } + } + } + catch { + Write-Warning "Failed to start '$($entry.Path)': $_" + } + } + + if ($TimeoutSeconds -le 0) { + Write-Host "`nAll WinUI apps are running. Manually validate them and close each window when finished." -ForegroundColor Cyan + } +} + +function New-ProjectFromTemplate { + param( + [string]$TemplateShortName, + [string]$ProjectName, + [string]$OutputPath, + [string]$WorkingDirectory + ) + + if (-not (Test-Path -Path $OutputPath)) { + New-Item -ItemType Directory -Path $OutputPath -Force | Out-Null + } + + Invoke-DotnetCommand -Arguments @('new', $TemplateShortName, '-n', $ProjectName, '-o', $OutputPath, '--force', '--no-update-check') -WorkingDirectory $WorkingDirectory -Description "create $TemplateShortName template" +} + +function Test-WinUiProjectTemplate { + param( + [string]$TemplateShortName, + [ValidateSet('App', 'Library', 'Test')] + [string]$Kind, + [string]$Platform, + [string]$WorkingRoot + ) + + $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 + Add-Result -Template $TemplateShortName -Platform $Platform -Step 'create' -Status 'Succeeded' -Path $projectPath + + $projectFile = Join-Path -Path $projectPath -ChildPath "$projectName.csproj" + + switch ($Kind) { + 'App' { + Invoke-DotnetCommand -Arguments @('build', $projectFile, '-p:Configuration=Debug', "-p:Platform=$Platform", '-p:WindowsPackageType=None') -WorkingDirectory $projectPath -Description 'build app template' + Add-Result -Template $TemplateShortName -Platform $Platform -Step 'build' -Status 'Succeeded' -Path $projectFile + + $exePath = Get-AppExecutablePath -ProjectPath $projectPath -ProjectName $projectName + if ($exePath) { + $appExecutables.Add([pscustomobject]@{ + Template = $TemplateShortName + Platform = $Platform + Path = $exePath + }) | Out-Null + } + else { + Write-Warning "Unable to locate executable for template '$TemplateShortName' at '$projectPath'." + } + } + 'Library' { + Invoke-DotnetCommand -Arguments @('build', $projectFile, '-c', 'Debug') -WorkingDirectory $projectPath -Description 'build library template' + Add-Result -Template $TemplateShortName -Platform 'AnyCPU' -Step 'build' -Status 'Succeeded' -Path $projectFile + } + 'Test' { + Invoke-DotnetCommand -Arguments @('test', $projectFile, '-p:Configuration=Debug', "-p:Platform=$Platform") -WorkingDirectory $projectPath -Description 'test packaged test template' + Add-Result -Template $TemplateShortName -Platform $Platform -Step 'test' -Status 'Succeeded' -Path $projectFile + } + } +} + +function Test-ItemTemplates { + param( + [string]$WorkingRoot, + [string]$Platform + ) + + $hostName = 'ItemHost_{0}' -f ([Guid]::NewGuid().ToString('N').Substring(0, 8)) + $hostPath = Join-Path -Path $WorkingRoot -ChildPath $hostName + New-ProjectFromTemplate -TemplateShortName 'winui' -ProjectName $hostName -OutputPath $hostPath -WorkingDirectory $WorkingRoot + Add-Result -Template 'winui (item host)' -Platform $Platform -Step 'create' -Status 'Succeeded' -Path $hostPath + + $projectFile = Join-Path -Path $hostPath -ChildPath "$hostName.csproj" + $itemTemplates = @( + @{ ShortName = 'winui-page'; Name = 'SettingsPage' }, + @{ ShortName = 'winui-window'; Name = 'SecondaryWindow' }, + @{ ShortName = 'winui-usercontrol'; Name = 'ProfileCard' }, + @{ ShortName = 'winui-templatedcontrol'; Name = 'DashboardControl' }, + @{ ShortName = 'winui-resourcedictionary'; Name = 'Colors' }, + @{ ShortName = 'winui-resw'; Name = 'Strings' }, + @{ ShortName = 'winui-dialog'; Name = 'ConfirmationDialog' } + ) + + foreach ($item in $itemTemplates) { + $args = @('new', $item.ShortName, '-n', $item.Name, '--project', $projectFile, '--force', '--no-update-check') + Invoke-DotnetCommand -Arguments $args -WorkingDirectory $hostPath -Description "create item template $($item.ShortName)" + Add-Result -Template $item.ShortName -Platform $Platform -Step 'add item' -Status 'Succeeded' -Path $projectFile + } + + Invoke-DotnetCommand -Arguments @('build', $projectFile, '-p:Configuration=Debug', "-p:Platform=$Platform", '-p:WindowsPackageType=None') -WorkingDirectory $hostPath -Description 'build item host' + Add-Result -Template 'winui (item host)' -Platform $Platform -Step 'build' -Status 'Succeeded' -Path $projectFile +} + +try { + $repoRoot = (Resolve-Path -Path (Join-Path -Path $PSScriptRoot -ChildPath '..\..\..')).Path + $templateProject = Join-Path -Path $repoRoot -ChildPath 'dev\Templates\Dotnet\WinAppSdk.CSharp.DotnetNewTemplates.csproj' + $tempBase = Join-Path -Path ([System.IO.Path]::GetTempPath()) -ChildPath 'DotnetNewTemplateValidation' + $workingRoot = Join-Path -Path $tempBase -ChildPath ([Guid]::NewGuid().ToString('N')) + + if (Test-Path -Path $workingRoot) { + Remove-Item -Path $workingRoot -Recurse -Force + } + New-Item -ItemType Directory -Path $workingRoot -Force | Out-Null + + $nugetFallback = Join-Path -Path $workingRoot -ChildPath '.nuget' + New-Item -ItemType Directory -Path $nugetFallback -Force | Out-Null + $env:NUGET_PACKAGES = $nugetFallback + + # Disable the MSBuild server to avoid lingering processes on CI agents. + $env:DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER = 'true' + + # Generate a NuGet.config so scaffolded projects resolve packages from + # internal feeds only. The repo's NuGet.config has relative local-source + # paths (tools/nuget, localpackages) that don't exist under the temp + # directory, and nuget.org is blocked by OneBranch network isolation. + # We extract only the remote (https) feeds from the repo config. + $repoNugetConfig = Join-Path -Path $repoRoot -ChildPath 'NuGet.config' + $workNugetConfig = Join-Path -Path $workingRoot -ChildPath 'NuGet.config' + if (Test-Path -Path $repoNugetConfig -PathType Leaf) { + [xml]$srcConfig = Get-Content -Path $repoNugetConfig + $remoteSources = $srcConfig.configuration.packageSources.add | + Where-Object { $_.value -match '^https?://' } + + if (-not $remoteSources) { + throw "No remote (https) NuGet sources found in $repoNugetConfig." + } + + $configLines = @( + '' + '' + ' ' + ' ' + ) + foreach ($src in $remoteSources) { + $configLines += ' ' -f $src.key, $src.value + } + $configLines += @( + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + ' ' + '' + ) + $configLines | Set-Content -Path $workNugetConfig -Encoding UTF8 + Write-Step "Generated NuGet.config with remote feeds in working directory" + } + + $packageToInstall = Get-TemplatePackagePath -PackagePathOverride $PackagePath -ProjectPath $templateProject -Configuration $Configuration -PackOutputDirectory $PackOutputDirectory -RepoRoot $repoRoot + Write-Step "Using template package '$packageToInstall'" + + Remove-TemplatePackIfPresent -RepoRoot $repoRoot + Install-TemplatePack -RepoRoot $repoRoot -PackageToInstall $packageToInstall + + $projectTemplates = @( + @{ ShortName = 'winui'; Kind = 'App' }, + @{ ShortName = 'winui-navview'; Kind = 'App' }, + @{ ShortName = 'winui-lib'; Kind = 'Library' }, + # winui-unittest is a self-hosted packaged test runner: tests run + # from inside UnitTestApp.OnLaunched (which sets DispatcherQueue and + # acquires package identity) via UnitTestClient.Run(), not via + # `dotnet test`. Validate it as an App so we still confirm the + # template builds cleanly. + @{ ShortName = 'winui-unittest'; Kind = 'App' } + ) + + foreach ($template in $projectTemplates) { + foreach ($platform in $Platforms) { + Test-WinUiProjectTemplate -TemplateShortName $template.ShortName -Kind $template.Kind -Platform $platform -WorkingRoot $workingRoot + } + } + + Test-ItemTemplates -WorkingRoot $workingRoot -Platform $Platforms[0] + + if ($appExecutables.Count -gt 0) { + if ($SkipAppLaunch.IsPresent) { + Write-Step 'SkipAppLaunch specified; WinUI apps were not started automatically.' + } + else { + Launch-AppExecutables -TimeoutSeconds $RunTimeoutSeconds + } + } + + Write-Step 'All templates validated successfully.' +} +catch { + $script:exitCode = 1 + Write-Error $_ +} +finally { + if ($null -ne $originalNugetPackages) { + $env:NUGET_PACKAGES = $originalNugetPackages + } + else { + Remove-Item Env:NUGET_PACKAGES -ErrorAction SilentlyContinue + } + + Remove-Item Env:DOTNET_CLI_DO_NOT_USE_MSBUILD_SERVER -ErrorAction SilentlyContinue + + if (-not $KeepWorkingDirectory.IsPresent -and (Test-Path -Path $workingRoot)) { + Write-Step "Cleaning up '$workingRoot'" + Remove-Item -Path $workingRoot -Recurse -Force -ErrorAction SilentlyContinue + } + elseif ($KeepWorkingDirectory.IsPresent -and $workingRoot) { + Write-Step "Preserving working directory at '$workingRoot'" + } + + if ($results.Count -gt 0) { + Write-Host "`nTemplate Validation Summary" -ForegroundColor Green + $results | Format-Table Template, Platform, Step, Status, Path -AutoSize | Out-String | Write-Host + } +} + +exit $script:exitCode \ No newline at end of file diff --git a/dev/Templates/Dotnet/WinAppSdk.CSharp.DotnetNewTemplates.csproj b/dev/Templates/Dotnet/WinAppSdk.CSharp.DotnetNewTemplates.csproj new file mode 100644 index 0000000000..e432695bf7 --- /dev/null +++ b/dev/Templates/Dotnet/WinAppSdk.CSharp.DotnetNewTemplates.csproj @@ -0,0 +1,175 @@ + + + + + + net8.0 + false + disable + false + false + true + Template + Microsoft.WindowsAppSDK.WinUI.CSharp.Templates + 0.0.5-alpha + WinUI 3 C# Templates + Microsoft + Microsoft + Official WinUI 3 project and item templates. Install this pack to use dotnet new for different types of apps, class libraries, unit tests and common WinUI controls. + windows;winappsdk;winui;winui3;desktop;dotnet-new;templates;csharp + https://learn.microsoft.com/windows/apps/windows-app-sdk/ + https://github.com/microsoft/WindowsAppSDK + git + MIT + README.md + © Microsoft Corporation. All rights reserved. + false + See https://github.com/microsoft/WindowsAppSDK/releases for release notes. + true + $(NoWarn);NU5128;CS2008 + $([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)..\..\..\localpackages')) + + + + + + + + + <_GitignoreSource>templates\gitignore.txt + + + + + + + + + + + + + + + + +(); +var commonExcludeNames = new HashSet(StringComparer.OrdinalIgnoreCase) { "bin", "obj" }; + +// Add one file -> one packed entry. Sets Pack/PackagePath so NuGet picks it up. +void Emit(string sourcePath, string packagePath) +{ + var item = new TaskItem(sourcePath); + item.SetMetadata("Pack", "true"); + item.SetMetadata("PackagePath", packagePath); + output.Add(item); +} + +// Recursively pack every file under fromDir into toRelRoot, optionally skipping +// files whose path relative to fromDir matches `skipRelative`. +void EmitTree(string fromDir, string toRelRoot, Func skipRelative = null) +{ + if (!Directory.Exists(fromDir)) { return; } + foreach (var file in Directory.EnumerateFiles(fromDir, "*", SearchOption.AllDirectories)) + { + string rel = file.Substring(fromDir.Length).TrimStart('\\', '/'); + if (skipRelative != null && skipRelative(rel)) { continue; } + Emit(file, toRelRoot + "/" + rel.Replace('\\', '/')); + } +} + +foreach (var t in Templates) +{ + string srcDir = t.GetMetadata("SourceDir"); + string configDir = t.GetMetadata("DotnetConfigDir"); + string baseName = t.GetMetadata("BaseName"); + string renameFrom = t.GetMetadata("RenameManifestFrom"); + string contentRoot = "content/" + t.ItemSpec; + + // Files in the Source tree that are VSIX-only sidecars (excluded from the dotnet-new pack). + // The Source-named manifest, if any, is excluded here and re-emitted under the reserved name below. + var sidecars = new HashSet(StringComparer.OrdinalIgnoreCase) + { + baseName + ".csproj", + baseName + ".ico", + baseName + ".png", + baseName + ".vstemplate", + }; + if (!string.IsNullOrEmpty(renameFrom)) { sidecars.Add(renameFrom); } + + // 1. Template source tree, minus bin/obj and the VSIX-only sidecars. + EmitTree(srcDir, contentRoot, rel => + { + var parts = rel.Split(new[] { '\\', '/' }, 2); + return commonExcludeNames.Contains(parts[0]) + || (parts.Length == 1 && sidecars.Contains(parts[0])); + }); + + // 2. Source-named manifest -> reserved Package.appxmanifest, if requested. + // An empty/unset RenameManifestFrom means the template has no manifest (e.g. class library) + // and is allowed. A non-empty value MUST resolve to a real file -- otherwise it's almost + // certainly a typo in templates.props that would silently ship a manifest-less template. + if (!string.IsNullOrEmpty(renameFrom)) + { + string manifestPath = Path.Combine(srcDir, renameFrom); + if (!File.Exists(manifestPath)) + { + Log.LogError( + "Template '{0}': RenameManifestFrom='{1}' but '{2}' does not exist. " + + "Fix the filename in templates.props, add the manifest under SourceDir, " + + "or clear RenameManifestFrom if this template has no manifest.", + t.ItemSpec, renameFrom, manifestPath); + continue; + } + Emit(manifestPath, contentRoot + "/Package.appxmanifest"); + } + + // 3. dotnet-new template configuration. + EmitTree(Path.Combine(configDir, ".template.config"), contentRoot + "/.template.config"); + + // 4. Shared .gitignore (one copy per template). + if (!string.IsNullOrEmpty(GitignoreSource) && File.Exists(GitignoreSource)) + { + Emit(GitignoreSource, contentRoot + "/gitignore.txt"); + } +} + +ExpandedItems = output.ToArray(); +]]> + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Dotnet/templates/blank-app/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/blank-app/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..481c8098eb --- /dev/null +++ b/dev/Templates/Dotnet/templates/blank-app/.template.config/dotnetcli.host.json @@ -0,0 +1,25 @@ +{ + "$schema": "https://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "dotnetVersion": { + "longName": "dotnet-version", + "shortName": "tfm", + "description": "Base TFM for the WinUI project (for example net10.0)." + }, + "targetPlatformMinVersion": { + "longName": "target-platform-min-version", + "shortName": "tpmv", + "description": "Minimum supported Windows version." + }, + "publisherDn": { + "longName": "publisher-dn", + "shortName": "publisher", + "description": "Publisher distinguished name stored in Package.appxmanifest." + }, + "publisherDisplay": { + "longName": "publisher-display", + "shortName": "publisherName", + "description": "Publisher display name stored in Package.appxmanifest." + } + } +} diff --git a/dev/Templates/Dotnet/templates/blank-app/.template.config/icon.png b/dev/Templates/Dotnet/templates/blank-app/.template.config/icon.png new file mode 100644 index 0000000000..1e450cb9b3 Binary files /dev/null and b/dev/Templates/Dotnet/templates/blank-app/.template.config/icon.png differ diff --git a/dev/Templates/Dotnet/templates/blank-app/.template.config/ide.host.json b/dev/Templates/Dotnet/templates/blank-app/.template.config/ide.host.json new file mode 100644 index 0000000000..cf34697102 --- /dev/null +++ b/dev/Templates/Dotnet/templates/blank-app/.template.config/ide.host.json @@ -0,0 +1,47 @@ +{ + "icon": "icon.png", + "requiredComponents": [ + { + "id": "Microsoft.VisualStudio.Workload.ManagedDesktop", + "hostId": "vs", + "componentType": "setupComponent" + } + ], + "symbolInfo": [ + { + "id": "dotnetVersion", + "name": { + "text": "Framework" + }, + "isVisible": "true" + }, + { + "id": "targetPlatformMinVersion", + "name": { + "text": "Target Platform Minimum Version" + }, + "isVisible": "true" + }, + { + "id": "publisherDn", + "name": { + "text": "Publisher Distinguished Name" + }, + "isVisible": "true" + }, + { + "id": "publisherDisplay", + "name": { + "text": "Publisher Display Name" + }, + "isVisible": "true" + }, + { + "id": "UseLatestWindowsAppSDK", + "name": { + "text": "Use latest Windows App SDK version" + }, + "isVisible": "true" + } + ] +} diff --git a/dev/Templates/Dotnet/templates/blank-app/.template.config/template.json b/dev/Templates/Dotnet/templates/blank-app/.template.config/template.json new file mode 100644 index 0000000000..84cf724979 --- /dev/null +++ b/dev/Templates/Dotnet/templates/blank-app/.template.config/template.json @@ -0,0 +1,235 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": [ "Windows", "WinUI", "Desktop", "XAML" ], + "tags": { + "language": "C#", + "type": "project" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.BlankApp", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.BlankApp", + "name": "WinUI Blank App", + "shortName": ["winui", "winui3", "wasdk-single"], + "sourceName": "ProjectTemplate", + "defaultName": "WinUIApp", + "description": "Creates a blank WinUI 3 desktop app with MSIX packaging.", + "preferNameDirectory": true, + "constraints": { + "windows-only": { + "type": "os", + "args": "Windows" + }, + "sdk-version": { + "type": "sdk-version", + "args": [ "[8.0,)" ] + } + }, + "symbols": { + "safeProjectName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_name", + "replaces": "$safeprojectname$" + }, + "projectName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$projectname$" + }, + "cliVersion": { + "type": "bind", + "binding": "host:dotnet-cli-version", + "defaultValue": "10.0.100" + }, + "autoDetectedTfm": { + "type": "generated", + "generator": "regex", + "datatype": "string", + "parameters": { + "source": "cliVersion", + "steps": [ + { + "regex": "^(\\d+)\\..*$", + "replacement": "net${1}.0" + } + ] + } + }, + "dotnetVersion": { + "type": "parameter", + "datatype": "choice", + "description": "Base target framework moniker (TFM) for the WinUI project. Defaults to the installed SDK version.", + "choices": [ + { "choice": "net8.0", "description": "Target .NET 8" }, + { "choice": "net9.0", "description": "Target .NET 9" }, + { "choice": "net10.0", "description": "Target .NET 10" } + ], + "defaultValue": "net10.0" + }, + "resolvedDotnetVersion": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "dotnetVersion", + "fallbackVariableName": "autoDetectedTfm" + }, + "replaces": "$DotNetVersion$" + }, + "targetPlatformMinVersion": { + "type": "parameter", + "datatype": "choice", + "replaces": "$targetplatformminversion$", + "defaultValue": "10.0.26100.0", + "choices": [ + { + "choice": "10.0.17763.0", + "description": "10.0.17763.0" + }, + { + "choice": "10.0.19041.0", + "description": "10.0.19041.0" + }, + { + "choice": "10.0.22000.0", + "description": "10.0.22000.0" + }, + { + "choice": "10.0.22621.0", + "description": "10.0.22621.0" + }, + { + "choice": "10.0.26100.0", + "description": "10.0.26100.0" + }, + { + "choice": "10.0.26200.0", + "description": "10.0.26200.0" + }, + { + "choice": "10.0.28000.0", + "description": "10.0.28000.0" + } + ], + "description": "Minimum supported Windows version." + }, + "publisherDn": { + "type": "parameter", + "datatype": "text", + "replaces": "$XmlEscapedPublisherDistinguishedName$", + "defaultValue": "CN=AppPublisher", + "description": "Publisher distinguished name used inside Package.appxmanifest." + }, + "publisherDisplay": { + "type": "parameter", + "datatype": "text", + "replaces": "$XmlEscapedPublisher$", + "defaultValue": "AppPublisher", + "description": "Publisher display name shown in the manifest and Settings page." + }, + "guid9": { + "type": "generated", + "generator": "guid", + "parameters": { + "format": "D" + }, + "replaces": "$guid9$" + }, + "UseLatestWindowsAppSDK":{ + "type": "parameter", + "datatype": "bool", + "defaultValue": "true" + }, + "windowsAppSdkVersion": { + "type": "parameter", + "datatype": "text", + "replaces": "$WindowsAppSdkVersion$", + "defaultValue": "1.8.260317003", + "description": "Version of the Microsoft.WindowsAppSDK NuGet package." + }, + "windowsSdkBuildToolsVersion": { + "type": "parameter", + "datatype": "text", + "replaces": "$WindowsSdkBuildToolsVersion$", + "defaultValue": "10.0.26100.7705", + "description": "Version of the Microsoft.Windows.SDK.BuildTools NuGet package." + }, + "windowsSdkBuildToolsWinAppVersion": { + "type": "parameter", + "datatype": "text", + "replaces": "$WindowsSdkBuildToolsWinAppVersion$", + "defaultValue": "0.3.1", + "description": "Version of the Microsoft.Windows.SDK.BuildTools.WinApp NuGet package, which adds `dotnet run` support for packaged WinUI apps via the winapp CLI." + } + }, + "sources": [ + { + "modifiers": [ + { + "replacements": [ + { + "before": "$targetnametoken$", + "after": "{{safeProjectName}}" + }, + { + "before": "$targetentrypoint$", + "after": "{{safeProjectName}}.App" + } + ] + } + ], + "rename": { + "gitignore.txt": ".gitignore" + } + } + ], + "primaryOutputs": [ + { "path": "ProjectTemplate.csproj" } + ], + "forms": { + "safe_name": { + "identifier": "safe_name" + }, + "identity": { + "identifier": "identity" + } + }, + "postActions": [ + { + "actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814", + "continueOnError": true, + "description": "Update Microsoft.WindowsAppSDK to the latest stable version.", + "args": { + "referenceType": "package", + "reference": "Microsoft.WindowsAppSDK" + }, + "manualInstructions": [{ "text": "Run 'dotnet add package Microsoft.WindowsAppSDK'" }] + }, + { + "actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814", + "continueOnError": true, + "description": "Update Microsoft.Windows.SDK.BuildTools to the latest stable version.", + "args": { + "referenceType": "package", + "reference": "Microsoft.Windows.SDK.BuildTools" + }, + "manualInstructions": [{ "text": "Run 'dotnet add package Microsoft.Windows.SDK.BuildTools'" }] + }, + { + "actionId": "B17581D1-C5C9-4489-8F0A-004BE667B814", + "continueOnError": true, + "description": "Update Microsoft.Windows.SDK.BuildTools.WinApp to the latest stable version (enables `dotnet run` for packaged WinUI apps).", + "args": { + "referenceType": "package", + "reference": "Microsoft.Windows.SDK.BuildTools.WinApp" + }, + "manualInstructions": [{ "text": "Run 'dotnet add package Microsoft.Windows.SDK.BuildTools.WinApp'" }] + }, + { + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "continueOnError": true, + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }] + } + ] +} diff --git a/dev/Templates/Dotnet/templates/class-library/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/class-library/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..33517743fd --- /dev/null +++ b/dev/Templates/Dotnet/templates/class-library/.template.config/dotnetcli.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "dotnetVersion": { + "longName": "dotnet-version", + "shortName": "tfm", + "description": "Base TFM for the WinUI project (for example net10.0)." + } + } +} diff --git a/dev/Templates/Dotnet/templates/class-library/.template.config/icon.png b/dev/Templates/Dotnet/templates/class-library/.template.config/icon.png new file mode 100644 index 0000000000..6cae8b54f8 Binary files /dev/null and b/dev/Templates/Dotnet/templates/class-library/.template.config/icon.png differ diff --git a/dev/Templates/Dotnet/templates/class-library/.template.config/ide.host.json b/dev/Templates/Dotnet/templates/class-library/.template.config/ide.host.json new file mode 100644 index 0000000000..2d4b488c9b --- /dev/null +++ b/dev/Templates/Dotnet/templates/class-library/.template.config/ide.host.json @@ -0,0 +1,19 @@ +{ + "icon": "icon.png", + "requiredComponents": [ + { + "id": "Microsoft.VisualStudio.Workload.ManagedDesktop", + "hostId": "vs", + "componentType": "setupComponent" + } + ], + "symbolInfo": [ + { + "id": "dotnetVersion", + "name": { + "text": "Framework" + }, + "isVisible": "true" + } + ] +} diff --git a/dev/Templates/Dotnet/templates/class-library/.template.config/template.json b/dev/Templates/Dotnet/templates/class-library/.template.config/template.json new file mode 100644 index 0000000000..d2091eac15 --- /dev/null +++ b/dev/Templates/Dotnet/templates/class-library/.template.config/template.json @@ -0,0 +1,106 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Windows", "WinUI", "Library"], + "tags": { + "language": "C#", + "type": "project" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.ClassLibrary", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.ClassLibrary", + "name": "WinUI Class Library", + "shortName": ["winui-lib", "winui3-lib", "wasdk-classlib"], + "sourceName": "ProjectTemplate", + "defaultName": "WinUILibrary", + "description": "Creates a WinUI 3 class library for sharing UI components.", + "preferNameDirectory": true, + "constraints": { + "windows-only": { + "type": "os", + "args": "Windows" + }, + "sdk-version": { + "type": "sdk-version", + "args": [ "[8.0,)" ] + } + }, + "symbols": { + "safeProjectName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_name", + "replaces": "$safeprojectname$" + }, + "projectName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$projectname$" + }, + "cliVersion": { + "type": "bind", + "binding": "host:dotnet-cli-version", + "defaultValue": "10.0.100" + }, + "autoDetectedTfm": { + "type": "generated", + "generator": "regex", + "datatype": "string", + "parameters": { + "source": "cliVersion", + "steps": [ + { + "regex": "^(\\d+)\\..*$", + "replacement": "net${1}.0" + } + ] + } + }, + "dotnetVersion": { + "type": "parameter", + "datatype": "choice", + "description": "Base target framework moniker (TFM) for the WinUI project. Defaults to the installed SDK version.", + "choices": [ + { "choice": "net8.0", "description": "Target .NET 8" }, + { "choice": "net9.0", "description": "Target .NET 9" }, + { "choice": "net10.0", "description": "Target .NET 10" } + ], + "defaultValue": "net10.0" + }, + "resolvedDotnetVersion": { + "type": "generated", + "generator": "coalesce", + "parameters": { + "sourceVariableName": "dotnetVersion", + "fallbackVariableName": "autoDetectedTfm" + }, + "replaces": "$DotNetVersion$" + } + }, + "sources": [ + { + "rename": { + "gitignore.txt": ".gitignore" + } + } + ], + "primaryOutputs": [ + { "path": "ProjectTemplate.csproj" } + ], + "forms": { + "safe_name": { + "identifier": "safe_name" + }, + "identity": { + "identifier": "identity" + } + }, + "postActions": [ + { + "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025", + "continueOnError": true, + "description": "Restore NuGet packages required by this project.", + "manualInstructions": [{ "text": "Run 'dotnet restore'" }] + } + ] +} diff --git a/dev/Templates/Dotnet/templates/gitignore.txt b/dev/Templates/Dotnet/templates/gitignore.txt new file mode 100644 index 0000000000..dd393563d9 --- /dev/null +++ b/dev/Templates/Dotnet/templates/gitignore.txt @@ -0,0 +1,54 @@ +## .NET / Visual Studio +[Bb]in/ +[Oo]bj/ +[Dd]ebug/ +[Rr]elease/ +.vs/ +*.user +*.suo +*.userosscache +*.sln.docstates +artifacts/ + +# Build logs +[Ll]og/ +[Ll]ogs/ +*.log +*.binlog + +# Test results +[Tt]est[Rr]esult*/ +*.trx +*.coverage +*.coveragexml + +# NuGet +*.nupkg +*.snupkg +*.nuget.props +*.nuget.targets +project.lock.json + +# MSIX packaging output +AppPackages/ +BundleArtifacts/ +*.msix +*.msixupload +*.appx +*.appxbundle +*.appxupload + +# Publish output +publish/ +*.pubxml +PublishScripts/ + +# Code analysis and tooling +_ReSharper*/ +*.DotSettings.user +*.dotCover +.idea/ + +# Generated files +Generated\ Files/ +*_wpftmp.csproj diff --git a/dev/Templates/Dotnet/templates/item-blank-page/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/item-blank-page/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..07c0730f73 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-blank-page/.template.config/dotnetcli.host.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "rootNamespace": { + "longName": "root-namespace", + "shortName": "ns" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-blank-page/.template.config/template.json b/dev/Templates/Dotnet/templates/item-blank-page/.template.config/template.json new file mode 100644 index 0000000000..80af991e23 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-blank-page/.template.config/template.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Windows", "WinUI", "Item", "Page"], + "tags": { + "language": "C#", + "type": "item" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.Page", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.Page", + "name": "WinUI Blank Page (Item)", + "shortName": ["winui-page", "winui3-page"], + "sourceName": "BlankPage", + "defaultName": "BlankPage", + "description": "Adds a WinUI 3 Page with XAML markup and code-behind.", + "preferNameDirectory": false, + "symbols": { + "rootNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "$rootnamespace$", + "defaultValue": "AppNamespace", + "description": "Namespace for the generated item." + }, + "safeItemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_name", + "replaces": "$safeitemname$" + }, + "itemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$itemname$" + }, + "fileInputName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$fileinputname$" + } + }, + "constraints": { + "winuiProject": { + "type": "project-capability", + "args": "CSharp & Msix" + } + }, + "primaryOutputs": [ + { "path": "BlankPage.xaml" }, + { "path": "BlankPage.xaml.cs" } + ], + "forms": { + "safe_name": { + "identifier": "safe_name" + }, + "identity": { + "identifier": "identity" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-blank-window/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/item-blank-window/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..f5ea9a9bd0 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-blank-window/.template.config/dotnetcli.host.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "rootNamespace": { + "longName": "root-namespace", + "shortName": "ns", + "description": "Namespace for the generated item." + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-blank-window/.template.config/template.json b/dev/Templates/Dotnet/templates/item-blank-window/.template.config/template.json new file mode 100644 index 0000000000..5845179f18 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-blank-window/.template.config/template.json @@ -0,0 +1,80 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Windows", "WinUI", "Item"], + "tags": { + "language": "C#", + "type": "item" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.Window", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.Window", + "name": "WinUI Blank Window (Item)", + "shortName": ["winui-window", "winui3-window", "wasdk-item-blankwin"], + "sourceName": "BlankWindow", + "defaultName": "BlankWindow", + "description": "Adds a WinUI 3 Window with XAML markup and code-behind.", + "tags": { + "language": "C#", + "type": "item" + }, + "preferNameDirectory": false, + "constraints": { + "windows-only": { + "type": "os", + "args": "Windows" + }, + "csharp-only": { + "type": "project-capability", + "args": "CSharp" + }, + "sdk-version": { + "type": "sdk-version", + "args": [ "[8.0,)" ] + } + }, + "symbols": { + "rootNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "$rootnamespace$", + "defaultValue": "AppNamespace", + "description": "Namespace for the generated item." + }, + "safeItemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_name", + "replaces": "$safeitemname$" + }, + "itemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$itemname$" + }, + "fileInputName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$fileinputname$" + } + }, + "constraints": { + "winuiProject": { + "type": "project-capability", + "args": "CSharp & Msix" + } + }, + "primaryOutputs": [ + { "path": "BlankWindow.xaml" }, + { "path": "BlankWindow.xaml.cs" } + ], + "forms": { + "safe_name": { + "identifier": "safe_name" + }, + "identity": { + "identifier": "identity" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-content-dialog/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/item-content-dialog/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..07c0730f73 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-content-dialog/.template.config/dotnetcli.host.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "rootNamespace": { + "longName": "root-namespace", + "shortName": "ns" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-content-dialog/.template.config/template.json b/dev/Templates/Dotnet/templates/item-content-dialog/.template.config/template.json new file mode 100644 index 0000000000..b5ec18c922 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-content-dialog/.template.config/template.json @@ -0,0 +1,86 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Windows", "WinUI", "Item", "Dialog"], + "tags": { + "language": "C#", + "type": "item" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.ContentDialog", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.ContentDialog", + "name": "WinUI Content Dialog (Item)", + "shortName": ["winui-dialog", "winui3-dialog"], + "sourceName": "ContentDialog", + "defaultName": "ContentDialog", + "description": "Adds a WinUI 3 ContentDialog with markup and code-behind.", + "preferNameDirectory": false, + "symbols": { + "rootNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "$rootnamespace$", + "defaultValue": "AppNamespace", + "description": "Namespace for the generated item." + }, + "safeItemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_name", + "replaces": "$safeitemname$" + }, + "itemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$itemname$" + }, + "fileInputName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$fileinputname$" + }, + "contentDialogType": { + "type": "generated", + "generator": "constant", + "parameters": { + "value": "ContentDialog" + }, + "replaces": "__WINUI_CONTENT_DIALOG__" + }, + "contentDialogButtonClickEventArgsType": { + "type": "generated", + "generator": "constant", + "parameters": { + "value": "ContentDialogButtonClickEventArgs" + }, + "replaces": "__WINUI_CONTENT_DIALOG_BUTTON_CLICK_EVENT_ARGS__" + }, + "defaultContentDialogStyleResourceKey": { + "type": "generated", + "generator": "constant", + "parameters": { + "value": "DefaultContentDialogStyle" + }, + "replaces": "__WINUI_DEFAULT_CONTENT_DIALOG_STYLE__" + } + }, + "constraints": { + "winuiProject": { + "type": "project-capability", + "args": "CSharp & Msix" + } + }, + "primaryOutputs": [ + { "path": "ContentDialog.xaml" }, + { "path": "ContentDialog.xaml.cs" } + ], + "forms": { + "safe_name": { + "identifier": "safe_name" + }, + "identity": { + "identifier": "identity" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-resource-dictionary/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/item-resource-dictionary/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..07c0730f73 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-resource-dictionary/.template.config/dotnetcli.host.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "rootNamespace": { + "longName": "root-namespace", + "shortName": "ns" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-resource-dictionary/.template.config/template.json b/dev/Templates/Dotnet/templates/item-resource-dictionary/.template.config/template.json new file mode 100644 index 0000000000..85a6963a3e --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-resource-dictionary/.template.config/template.json @@ -0,0 +1,69 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Windows", "WinUI", "Item", "Resource"], + "tags": { + "language": "C#", + "type": "item" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.ResourceDictionary", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.ResourceDictionary", + "name": "WinUI Resource Dictionary (Item)", + "shortName": ["winui-resourcedictionary", "winui3-resourcedictionary"], + "sourceName": "ResourceDictionary", + "defaultName": "ResourceDictionary", + "description": "Adds a WinUI 3 ResourceDictionary for sharing styles and resources.", + "preferNameDirectory": false, + "symbols": { + "rootNamespace": { + "type": "bind", + "binding": "msbuild:RootNamespace", + "replaces": "$rootnamespace$", + "defaultValue": "AppNamespace", + "description": "Namespace for the generated item." + }, + "safeItemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_name", + "replaces": "$safeitemname$" + }, + "itemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$itemname$" + }, + "fileInputName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$fileinputname$" + }, + "resourceDictionaryType": { + "type": "generated", + "generator": "constant", + "parameters": { + "value": "ResourceDictionary" + }, + "replaces": "__WINUI_RESOURCE_DICTIONARY__" + } + }, + "constraints": { + "winuiProject": { + "type": "project-capability", + "args": "CSharp & Msix" + } + }, + "primaryOutputs": [ + { "path": "ResourceDictionary.xaml" } + ], + "forms": { + "safe_name": { + "identifier": "safe_name" + }, + "identity": { + "identifier": "identity" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-resw/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/item-resw/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..94f4ee1014 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-resw/.template.config/dotnetcli.host.json @@ -0,0 +1,3 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host" +} diff --git a/dev/Templates/Dotnet/templates/item-resw/.template.config/template.json b/dev/Templates/Dotnet/templates/item-resw/.template.config/template.json new file mode 100644 index 0000000000..f1bfb76767 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-resw/.template.config/template.json @@ -0,0 +1,63 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Windows", "WinUI", "Item", "Resource"], + "tags": { + "language": "C#", + "type": "item" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.Resw", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.Resw", + "name": "WinUI Resources File (Item)", + "shortName": ["winui-resw", "winui3-resw"], + "sourceName": "Resources", + "defaultName": "Resources", + "description": "Adds a RESW resources file for localized strings.", + "preferNameDirectory": false, + "symbols": { + "safeItemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "safe_name", + "replaces": "$safeitemname$" + }, + "itemName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$itemname$" + }, + "fileInputName": { + "type": "derived", + "valueSource": "name", + "valueTransform": "identity", + "replaces": "$fileinputname$" + } + }, + "constraints": { + "winuiProject": { + "type": "project-capability", + "args": "CSharp & Msix" + } + }, + "sources": [ + { + "modifiers": [ + { + "copyOnly": [ "**/*.resw" ] + } + ] + } + ], + "primaryOutputs": [ + { "path": "Resources.resw" } + ], + "forms": { + "safe_name": { + "identifier": "safe_name" + }, + "identity": { + "identifier": "identity" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-templated-control/.template.config/dotnetcli.host.json b/dev/Templates/Dotnet/templates/item-templated-control/.template.config/dotnetcli.host.json new file mode 100644 index 0000000000..07c0730f73 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-templated-control/.template.config/dotnetcli.host.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json.schemastore.org/dotnetcli.host", + "symbolInfo": { + "rootNamespace": { + "longName": "root-namespace", + "shortName": "ns" + } + } +} diff --git a/dev/Templates/Dotnet/templates/item-templated-control/.template.config/template.json b/dev/Templates/Dotnet/templates/item-templated-control/.template.config/template.json new file mode 100644 index 0000000000..c851c3ce83 --- /dev/null +++ b/dev/Templates/Dotnet/templates/item-templated-control/.template.config/template.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://json.schemastore.org/template", + "author": "Microsoft", + "classifications": ["Windows", "WinUI", "Item", "Control"], + "tags": { + "language": "C#", + "type": "item" + }, + "identity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.TemplatedControl", + "groupIdentity": "Microsoft.WindowsAppSDK.WinUI.CSharp.Item.TemplatedControl", + "name": "WinUI Templated Control (Item)", + "shortName": ["winui-templatedcontrol", "winui3-templatedcontrol"], + "sourceName": "CustomControl", + "defaultName": "CustomControl", + "description": "Adds a WinUI 3 templated control. By default also creates Themes\\Generic.xaml with a minimal default style. If your project already has a Themes\\Generic.xaml, pass --IncludeDefaultStyle false and manually add a + + diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.csproj b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.csproj similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.csproj rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.csproj diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.ico b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.ico similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.ico rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.ico diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.vstemplate b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.vstemplate similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.vstemplate rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/TemplatedControl/WinUI.Neutral.Cs.TemplatedControl.vstemplate diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml similarity index 90% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml index a4827ebfaa..2266654ed8 100644 --- a/dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml +++ b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml @@ -1,5 +1,5 @@ - - + diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml.cs b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml.cs similarity index 90% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml.cs rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml.cs index 3134a41a44..ff7f2afb3e 100644 --- a/dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml.cs +++ b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/UserControl.xaml.cs @@ -18,7 +18,7 @@ namespace $rootnamespace$; -public sealed partial class $safeitemname$ : UserControl +public sealed partial class $safeitemname$ : __WINUI_USERCONTROL__ { public $safeitemname$() { diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.csproj b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.csproj similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.csproj rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.csproj diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.ico b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.ico similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.ico rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.ico diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.vstemplate b/dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.vstemplate similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.vstemplate rename to dev/Templates/Source/ItemTemplates/Neutral/CSharp/UserControl/WinUI.Neutral.Cs.UserControl.vstemplate diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.cpp b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.cpp similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.cpp rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.cpp diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.h b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.h similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.h rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.h diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.idl b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.idl similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.idl rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.idl diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.xaml b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.xaml similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.xaml rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/BlankPage.xaml diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.csproj b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.csproj similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.csproj rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.csproj diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.ico b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.ico similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.ico rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.ico diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.vstemplate b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.vstemplate similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.vstemplate rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/BlankPage/WinUI.Neutral.CppWinRT.BlankPage.vstemplate diff --git a/dev/VSIX/ItemTemplates/Neutral/CSharp/ResourceDictionary/ResourceDictionary.xaml b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/ResourceDictionary.xaml similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CSharp/ResourceDictionary/ResourceDictionary.xaml rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/ResourceDictionary.xaml diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.csproj b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.csproj similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.csproj rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.csproj diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.ico b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.ico similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.ico rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.ico diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.vstemplate b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.vstemplate similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.vstemplate rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/ResourceDictionary/WinUI.Neutral.CppWinRT.ResourceDictionary.vstemplate diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/Resources.resw b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/Resources.resw similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/Resources.resw rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/Resources.resw diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.csproj b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.csproj similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.csproj rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.csproj diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.ico b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.ico similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.ico rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.ico diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.vstemplate b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.vstemplate similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.vstemplate rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/Resw/WinUI.Neutral.CppWinRT.Resw.vstemplate diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.cpp b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.cpp similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.cpp rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.cpp diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.h b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.h similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.h rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.h diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.idl b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.idl similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.idl rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/TemplatedControl.idl diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.csproj b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.csproj similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.csproj rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.csproj diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.ico b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.ico similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.ico rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.ico diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.vstemplate b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.vstemplate similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.vstemplate rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/TemplatedControl/WinUI.Neutral.CppWinRT.TemplatedControl.vstemplate diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.cpp b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.cpp similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.cpp rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.cpp diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.h b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.h similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.h rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.h diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.idl b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.idl similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.idl rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.idl diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.xaml b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.xaml similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.xaml rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/UserControl.xaml diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.csproj b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.csproj similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.csproj rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.csproj diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.ico b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.ico similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.ico rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.ico diff --git a/dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.vstemplate b/dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.vstemplate similarity index 100% rename from dev/VSIX/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.vstemplate rename to dev/Templates/Source/ItemTemplates/Neutral/CppWinRT/UserControl/WinUI.Neutral.CppWinRT.UserControl.vstemplate diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/Class1.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/Class1.cs similarity index 63% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/Class1.cs rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/Class1.cs index 805fc0ab24..26970a3c16 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/Class1.cs +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/Class1.cs @@ -1,9 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - // To learn more about WinUI, the WinUI project structure, // and more about our project templates, see: http://aka.ms/winui-project-info. diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/ProjectTemplate.csproj similarity index 77% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/ProjectTemplate.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/ProjectTemplate.csproj index 5440c6391b..15d7a5bc50 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/ProjectTemplate.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/ProjectTemplate.csproj @@ -1,10 +1,11 @@ - $DotNetVersion$-windows10.0.19041.0 + $DotNetVersion$-windows10.0.26100.0 10.0.17763.0 $safeprojectname$ true false + enable false \ No newline at end of file diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.csproj similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.csproj diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.vstemplate similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/ClassLibrary/WinUI.Desktop.Cs.ClassLibrary.vstemplate diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/App.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/App.xaml diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/App.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/App.xaml.cs new file mode 100644 index 0000000000..8470b455b7 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/App.xaml.cs @@ -0,0 +1,57 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : Application +{ + /// + /// The main application window. Use App.Window from any class that needs + /// the window reference (for dialogs, pickers, interop, etc.). + /// + public static Window Window { get; private set; } = null!; + + /// + /// The UI thread dispatcher. Use App.DispatcherQueue to marshal calls + /// to the UI thread. Fully qualified to avoid CS0104 ambiguity with + /// . + /// + public static Microsoft.UI.Dispatching.DispatcherQueue DispatcherQueue { get; private set; } = null!; + + /// + /// The native window handle (HWND). Use for file pickers, + /// DataTransferManager, and any WinRT interop that requires + /// InitializeWithWindow. + /// + public static nint WindowHandle => + WinRT.Interop.WindowNative.GetWindowHandle(Window); + + /// + /// Initializes the singleton application object. + /// + public App() + { + InitializeComponent(); + } + + /// + /// Invoked when the application is launched. + /// + /// Details about the launch request and process. + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) + { + Window = new MainWindow(); + DispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.GetForCurrentThread(); + Window.Activate(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/AppIcon.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/AppIcon.ico new file mode 100644 index 0000000000..235dad2c56 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/AppIcon.ico differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/LockScreenLogo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/StoreLogo.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainPage.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainPage.xaml new file mode 100644 index 0000000000..b3a273509f --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainPage.xaml @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainPage.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainPage.xaml.cs new file mode 100644 index 0000000000..352f251a18 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainPage.xaml.cs @@ -0,0 +1,20 @@ +using Microsoft.UI.Xaml.Controls; +using $safeprojectname$.ViewModels; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$; + +/// +/// The main content page displayed inside the application window. +/// +public sealed partial class MainPage : Page +{ + public MainPageViewModel ViewModel { get; } = new(); + + public MainPage() + { + InitializeComponent(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainWindow.xaml new file mode 100644 index 0000000000..29974c45fd --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainWindow.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainWindow.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainWindow.xaml.cs new file mode 100644 index 0000000000..fc24f9ed43 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/MainWindow.xaml.cs @@ -0,0 +1,27 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$; + +/// +/// The application window. This hosts a Frame that displays pages. Add your +/// UI and logic to MainPage.xaml / MainPage.xaml.cs instead of here so you +/// can use Page features such as navigation events and the Loaded lifecycle. +/// +public sealed partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + + ExtendsContentIntoTitleBar = true; + SetTitleBar(AppTitleBar); + + AppWindow.SetIcon("Assets/AppIcon.ico"); + + // Navigate the root frame to the main page on startup. + RootFrame.Navigate(typeof(MainPage)); + } +} diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Package-managed.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Package-managed.appxmanifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Package-managed.appxmanifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Package-managed.appxmanifest diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/ProjectTemplate.csproj new file mode 100644 index 0000000000..a4beb3c1d9 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/ProjectTemplate.csproj @@ -0,0 +1,76 @@ + + + WinExe + $DotNetVersion$-windows10.0.26100.0 + 10.0.17763.0 + $safeprojectname$ + app.manifest + x86;x64;ARM64 + win-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) + win-$(Platform).pubxml + true + false + true + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + False + True + False + True + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-arm64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/PublishProfiles/win-arm64.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-arm64.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/PublishProfiles/win-arm64.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/PublishProfiles/win-x64.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x64.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/PublishProfiles/win-x64.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x86.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/PublishProfiles/win-x86.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x86.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/PublishProfiles/win-x86.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/launchSettings.json b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/launchSettings.json similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/launchSettings.json rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/Properties/launchSettings.json diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/ViewModels/MainPageViewModel.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/ViewModels/MainPageViewModel.cs new file mode 100644 index 0000000000..8bb9363346 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/ViewModels/MainPageViewModel.cs @@ -0,0 +1,30 @@ +using CommunityToolkit.Mvvm.ComponentModel; +using CommunityToolkit.Mvvm.Input; + +namespace $safeprojectname$.ViewModels; + +/// +/// Sample ViewModel using CommunityToolkit.Mvvm partial property syntax. +/// Uses for change notification and +/// for command binding. +/// +public partial class MainPageViewModel : ObservableObject +{ + [ObservableProperty] + public partial string Greeting { get; set; } = "Hello, WinUI!"; + + [ObservableProperty] + public partial int Counter { get; set; } + + [RelayCommand] + private void Increment() + { + Counter++; + } + + [RelayCommand] + private void Decrement() + { + Counter--; + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.csproj new file mode 100644 index 0000000000..ce99462535 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.csproj @@ -0,0 +1,91 @@ + + + + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + Debug + AnyCPU + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {C3D4E5F6-3333-4C7D-BE0F-3A4B5C6D7E8F} + Library + Properties + WinUI.Desktop.Cs.MvvmApp + WinUI.Desktop.Cs.MvvmApp + v4.7.2 + 512 + false + false + false + false + false + false + false + false + false + false + SHA256 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + Designer + + + + + + + Designer + + + Designer + + + + + Designer + + + + + + + + + + + + + + + + + + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.png diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.vstemplate new file mode 100644 index 0000000000..57bca3d069 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/WinUI.Desktop.Cs.MvvmApp.vstemplate @@ -0,0 +1,73 @@ + + + + + + WinUI.Desktop.Cs.MvvmApp.ico + Microsoft.WinUI.Desktop.Cs.MvvmApp + WinRT-Managed + CSharp + true + App + true + Enabled + true + 2 + Windows + true + WinUI.Desktop.Cs.MvvmApp.png + true + csharp + XAML + windows + desktop + WinUI + + + + + + + + + Properties\launchSettings.json + Properties\PublishProfiles\win-arm64.pubxml + Properties\PublishProfiles\win-x64.pubxml + Properties\PublishProfiles\win-x86.pubxml + app.manifest + App.xaml + App.xaml.cs + MainWindow.xaml + MainWindow.xaml.cs + MainPage.xaml + MainPage.xaml.cs + Package-managed.appxmanifest + + MainPageViewModel.cs + + + SplashScreen.scale-200.png + LockScreenLogo.scale-200.png + Square150x150Logo.scale-200.png + Square44x44Logo.scale-200.png + Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png + StoreLogo.png + AppIcon.ico + Wide310x150Logo.scale-200.png + + + + + + + + + Microsoft.VisualStudio.WinRT.TemplateWizards, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Microsoft.VisualStudio.WinRT.TemplateWizards.UpdatePublisherInManifestWizard + + + WindowsAppSDK.Cs.Extension.Dev17, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + WindowsAppSDK.TemplateUtilities.NuGetPackageInstaller + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/app.manifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/app.manifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/MvvmApp/app.manifest diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/App.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/App.xaml diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/App.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/App.xaml.cs new file mode 100644 index 0000000000..9b38e0006b --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/App.xaml.cs @@ -0,0 +1,38 @@ +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Navigation; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : Application +{ + private Window? _window; + + /// + /// Initializes the singleton application object. This is the first line of authored code + /// executed, and as such is the logical equivalent of main() or WinMain(). + /// + public App() + { + InitializeComponent(); + } + + /// + /// Invoked when the application is launched. + /// + /// Details about the launch request and process. + protected override void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs args) + { + _window = new MainWindow(); + _window.Activate(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/AppIcon.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/AppIcon.ico new file mode 100644 index 0000000000..235dad2c56 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/AppIcon.ico differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/LockScreenLogo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/StoreLogo.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/MainWindow.xaml new file mode 100644 index 0000000000..d67314deb1 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/MainWindow.xaml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/MainWindow.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/MainWindow.xaml.cs new file mode 100644 index 0000000000..7fa6bb2664 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/MainWindow.xaml.cs @@ -0,0 +1,54 @@ +using Microsoft.UI.Windowing; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using $safeprojectname$.Pages; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$; + +public sealed partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + + ExtendsContentIntoTitleBar = true; + SetTitleBar(AppTitleBar); + AppWindow.TitleBar.PreferredHeightOption = TitleBarHeightOption.Tall; + AppWindow.SetIcon("Assets/AppIcon.ico"); + } + + private void TitleBar_PaneToggleRequested(TitleBar sender, object args) + { + NavView.IsPaneOpen = !NavView.IsPaneOpen; + } + + private void TitleBar_BackRequested(TitleBar sender, object args) + { + NavFrame.GoBack(); + } + + private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) + { + if (args.IsSettingsSelected) + { + NavFrame.Navigate(typeof(SettingsPage)); + } + else if (args.SelectedItem is NavigationViewItem item) + { + switch (item.Tag) + { + case "home": + NavFrame.Navigate(typeof(HomePage)); + break; + case "about": + NavFrame.Navigate(typeof(AboutPage)); + break; + default: + throw new InvalidOperationException($"Unknown navigation item tag: {item.Tag}"); + } + } + } +} diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Package-managed.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Package-managed.appxmanifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Package-managed.appxmanifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Package-managed.appxmanifest diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/AboutPage.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/AboutPage.xaml new file mode 100644 index 0000000000..9077189545 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/AboutPage.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/AboutPage.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/AboutPage.xaml.cs new file mode 100644 index 0000000000..895e6396bf --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/AboutPage.xaml.cs @@ -0,0 +1,14 @@ +using Microsoft.UI.Xaml.Controls; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$.Pages; + +public sealed partial class AboutPage : Page +{ + public AboutPage() + { + InitializeComponent(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/HomePage.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/HomePage.xaml new file mode 100644 index 0000000000..ab4b74135e --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/HomePage.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/HomePage.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/HomePage.xaml.cs new file mode 100644 index 0000000000..3c546496b8 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/HomePage.xaml.cs @@ -0,0 +1,14 @@ +using Microsoft.UI.Xaml.Controls; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$.Pages; + +public sealed partial class HomePage : Page +{ + public HomePage() + { + InitializeComponent(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/SettingsPage.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/SettingsPage.xaml new file mode 100644 index 0000000000..7dca11a1c5 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/SettingsPage.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/SettingsPage.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/SettingsPage.xaml.cs new file mode 100644 index 0000000000..e2b1112ba2 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Pages/SettingsPage.xaml.cs @@ -0,0 +1,17 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.UI.Xaml.Controls; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$.Pages; + +public sealed partial class SettingsPage : Page +{ + public SettingsPage() + { + InitializeComponent(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/ProjectTemplate.csproj new file mode 100644 index 0000000000..7589d99c4c --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/ProjectTemplate.csproj @@ -0,0 +1,75 @@ + + + WinExe + $DotNetVersion$-windows10.0.26100.0 + 10.0.17763.0 + $safeprojectname$ + app.manifest + x86;x64;ARM64 + win-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) + win-$(Platform).pubxml + true + false + true + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + False + True + False + True + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-arm64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/PublishProfiles/win-arm64.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-arm64.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/PublishProfiles/win-arm64.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/PublishProfiles/win-x64.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x64.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/PublishProfiles/win-x64.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x86.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/PublishProfiles/win-x86.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x86.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/PublishProfiles/win-x86.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/launchSettings.json b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/launchSettings.json similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/launchSettings.json rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/Properties/launchSettings.json diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.csproj new file mode 100644 index 0000000000..de1bc9cf8c --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.csproj @@ -0,0 +1,98 @@ + + + + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + Debug + AnyCPU + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {B2C3D4E5-2222-4B6C-AD9E-2F3A4B5C6D7E} + Library + Properties + WinUI.Desktop.Cs.NavigationApp + WinUI.Desktop.Cs.NavigationApp + v4.7.2 + 512 + false + false + false + false + false + false + false + false + false + false + SHA256 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + Designer + + + + + + + Designer + + + Designer + + + + + Designer + + + + Designer + + + + Designer + + + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.ico new file mode 100644 index 0000000000..624c2be0d1 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.ico differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.png new file mode 100644 index 0000000000..211e75744b Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.vstemplate new file mode 100644 index 0000000000..9e4ad75d31 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/WinUI.Desktop.Cs.NavigationApp.vstemplate @@ -0,0 +1,76 @@ + + + + + + WinUI.Desktop.Cs.NavigationApp.ico + Microsoft.WinUI.Desktop.Cs.NavigationApp + WinRT-Managed + CSharp + true + App + true + Enabled + true + 2 + Windows + true + WinUI.Desktop.Cs.NavigationApp.png + true + csharp + XAML + windows + desktop + WinUI + + + + + + + + + Properties\launchSettings.json + Properties\PublishProfiles\win-arm64.pubxml + Properties\PublishProfiles\win-x64.pubxml + Properties\PublishProfiles\win-x86.pubxml + app.manifest + App.xaml + App.xaml.cs + MainWindow.xaml + MainWindow.xaml.cs + Package-managed.appxmanifest + + HomePage.xaml + HomePage.xaml.cs + AboutPage.xaml + AboutPage.xaml.cs + SettingsPage.xaml + SettingsPage.xaml.cs + + + SplashScreen.scale-200.png + LockScreenLogo.scale-200.png + Square150x150Logo.scale-200.png + Square44x44Logo.scale-200.png + Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png + StoreLogo.png + AppIcon.ico + Wide310x150Logo.scale-200.png + + + + + + + + + Microsoft.VisualStudio.WinRT.TemplateWizards, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Microsoft.VisualStudio.WinRT.TemplateWizards.UpdatePublisherInManifestWizard + + + WindowsAppSDK.Cs.Extension.Dev17, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + WindowsAppSDK.TemplateUtilities.NuGetPackageInstaller + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/app.manifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/app.manifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/NavigationApp/app.manifest diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml.cs similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml.cs rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/App.xaml.cs diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/AppIcon.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/AppIcon.ico new file mode 100644 index 0000000000..235dad2c56 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/AppIcon.ico differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml similarity index 50% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml index 5c061d1cbf..2dde673831 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml @@ -1,19 +1,29 @@ - + - + Title="$projectname$" + mc:Ignorable="d"> + + + + + + + + + + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml.cs similarity index 85% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml.cs rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml.cs index ef074a16f3..4b2e0e2eb5 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml.cs +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml.cs @@ -18,13 +18,15 @@ namespace $safeprojectname$; -/// -/// An empty window that can be used on its own or navigated to within a Frame. -/// public sealed partial class MainWindow : Window { public MainWindow() { InitializeComponent(); + + ExtendsContentIntoTitleBar = true; + SetTitleBar(AppTitleBar); + + AppWindow.SetIcon("AppIcon.ico"); } } diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/ProjectTemplate.csproj similarity index 94% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/ProjectTemplate.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/ProjectTemplate.csproj index 2ad24222f0..67cd6291fd 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/ProjectTemplate.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/ProjectTemplate.csproj @@ -12,6 +12,10 @@ enable + + + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-arm64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-arm64.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-arm64.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-arm64.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x64.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x64.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x64.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x86.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x86.pubxml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x86.pubxml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/Properties/PublishProfiles/win-x86.pubxml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.vstemplate similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/WinUI.Desktop.Cs.BlankApp.vstemplate diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/app.manifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/app.manifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/app.manifest diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/LockScreenLogo.scale-200.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Package-managed.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Package-managed.appxmanifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Package-managed.appxmanifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Package-managed.appxmanifest diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/StoreLogo.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.wapproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.wapproj similarity index 97% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.wapproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.wapproj index 2147dfdcd2..4f99481659 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.wapproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WapProjTemplate.wapproj @@ -67,6 +67,7 @@ + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Wide310x150Logo.scale-200.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WinUI.Desktop.Cs.WapProj.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WinUI.Desktop.Cs.WapProj.vstemplate similarity index 95% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WinUI.Desktop.Cs.WapProj.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WinUI.Desktop.Cs.WapProj.vstemplate index 92384a2337..b622aec714 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WinUI.Desktop.Cs.WapProj.vstemplate +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/WinUI.Desktop.Cs.WapProj.vstemplate @@ -35,6 +35,7 @@ Square150x150Logo.scale-200.png Square44x44Logo.scale-200.png Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png StoreLogo.png Wide310x150Logo.scale-200.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.csproj similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.csproj diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.vstemplate similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/PackagedApp/WinUI.Desktop.Cs.PackagedApp.vstemplate diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml.cs similarity index 88% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml.cs rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml.cs index f2a43695a2..c61137c92f 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml.cs +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/App.xaml.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; +using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/AppIcon.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/AppIcon.ico new file mode 100644 index 0000000000..235dad2c56 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/AppIcon.ico differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/StoreLogo.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainPage.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainPage.xaml new file mode 100644 index 0000000000..c7c89c7238 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainPage.xaml @@ -0,0 +1,18 @@ + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainPage.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainPage.xaml.cs new file mode 100644 index 0000000000..6fc70d7281 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainPage.xaml.cs @@ -0,0 +1,20 @@ +using Microsoft.UI.Xaml.Controls; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$; + +/// +/// The main content page displayed inside the application window. +/// Add your UI logic, event handlers, and data binding here. +/// +public sealed partial class MainPage : Page +{ + public MainPage() + { + InitializeComponent(); + + // TODO: Add your initialization logic here. + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml new file mode 100644 index 0000000000..29974c45fd --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml.cs new file mode 100644 index 0000000000..fc24f9ed43 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml.cs @@ -0,0 +1,27 @@ +using Microsoft.UI.Xaml; + +// To learn more about WinUI, the WinUI project structure, +// and more about our project templates, see: http://aka.ms/winui-project-info. + +namespace $safeprojectname$; + +/// +/// The application window. This hosts a Frame that displays pages. Add your +/// UI and logic to MainPage.xaml / MainPage.xaml.cs instead of here so you +/// can use Page features such as navigation events and the Loaded lifecycle. +/// +public sealed partial class MainWindow : Window +{ + public MainWindow() + { + InitializeComponent(); + + ExtendsContentIntoTitleBar = true; + SetTitleBar(AppTitleBar); + + AppWindow.SetIcon("Assets/AppIcon.ico"); + + // Navigate the root frame to the main page on startup. + RootFrame.Navigate(typeof(MainPage)); + } +} diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Package-native.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Package-managed.appxmanifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Package-native.appxmanifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Package-managed.appxmanifest diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/ProjectTemplate.csproj similarity index 63% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/ProjectTemplate.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/ProjectTemplate.csproj index 4c6b8df175..5cfe00875a 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/ProjectTemplate.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/ProjectTemplate.csproj @@ -1,16 +1,17 @@ WinExe - $DotNetVersion$-windows10.0.19041.0 + $DotNetVersion$-windows10.0.26100.0 10.0.17763.0 $safeprojectname$ app.manifest x86;x64;ARM64 - win-x86;win-x64;win-arm64 - win-$(Platform).pubxml + win-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) + win-$(Platform).pubxml true false true + enable enable @@ -20,7 +21,9 @@ + + @@ -37,6 +40,22 @@ + + + + + + FileSystem + ARM64 + win-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 0000000000..cd995617c0 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,14 @@ + + + + + FileSystem + x64 + win-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x86.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x86.pubxml new file mode 100644 index 0000000000..a70c69425f --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/PublishProfiles/win-x86.pubxml @@ -0,0 +1,14 @@ + + + + + FileSystem + x86 + win-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/launchSettings.json b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/launchSettings.json new file mode 100644 index 0000000000..e25cd6a4f8 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "$projectname$ (Package)": { + "commandName": "MsixPackage" + }, + "$projectname$ (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj similarity index 98% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj index 7051d6815b..9641aaf7f3 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj @@ -73,6 +73,7 @@ + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.ico new file mode 100644 index 0000000000..293c93c712 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.ico differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.png new file mode 100644 index 0000000000..491faf7065 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.vstemplate similarity index 90% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.vstemplate index 2a1fb70704..7690fc7da9 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.vstemplate +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/WinUI.Desktop.Cs.SingleProjectPackagedApp.vstemplate @@ -39,6 +39,8 @@ App.xaml.cs MainWindow.xaml MainWindow.xaml.cs + MainPage.xaml + MainPage.xaml.cs Package-managed.appxmanifest SplashScreen.scale-200.png @@ -46,12 +48,13 @@ Square150x150Logo.scale-200.png Square44x44Logo.scale-200.png Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png StoreLogo.png Wide310x150Logo.scale-200.png - + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/app.manifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/app.manifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/app.manifest diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/App.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/App.xaml diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/App.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/App.xaml.cs new file mode 100644 index 0000000000..8caa9b0f1d --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/App.xaml.cs @@ -0,0 +1,32 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.UI.Xaml; + +namespace $safeprojectname$; + +/// +/// Provides application-specific behavior to supplement the default Application class. +/// +public partial class App : Application +{ + private Window? _window; + + /// + /// Initializes the singleton application object. + /// + public App() + { + InitializeComponent(); + } + + /// + /// Invoked when the application is launched. + /// + /// Details about the launch request and process. + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + _window = new MainWindow(); + _window.Activate(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/AppIcon.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/AppIcon.ico new file mode 100644 index 0000000000..235dad2c56 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/AppIcon.ico differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/LockScreenLogo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/StoreLogo.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/MainWindow.xaml new file mode 100644 index 0000000000..aebd1f83f0 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/MainWindow.xaml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/MainWindow.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/MainWindow.xaml.cs new file mode 100644 index 0000000000..4f78cd1ff8 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/MainWindow.xaml.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.UI.Windowing; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using $safeprojectname$.Pages; + +namespace $safeprojectname$; + +public sealed partial class MainWindow : Window +{ + private int _tabCounter; + + public MainWindow() + { + InitializeComponent(); + + // Extend content into the title bar and use the TabView's + // drag region so the tab strip acts as the title bar area. + ExtendsContentIntoTitleBar = true; + SetTitleBar(CustomDragRegion); + AppWindow.SetIcon("Assets/AppIcon.ico"); + + // Reserve space at the right edge of the tab strip for the system + // caption buttons, scaled to the current DPI so they don't overlap + // tabs on high-DPI displays. + AppWindow.Changed += OnAppWindowChanged; + UpdateCaptionButtonInset(); + + // Add a few default tabs on startup. + AddTab("Home", typeof(HomePage)); + AddTab("About", typeof(AboutPage)); + TabControl.SelectedIndex = 0; + } + + private void OnAppWindowChanged(AppWindow sender, AppWindowChangedEventArgs args) + { + if (args.DidSizeChange || args.DidPositionChange) + { + UpdateCaptionButtonInset(); + } + } + + private void UpdateCaptionButtonInset() + { + // RightInset is in physical pixels; convert to DIPs. + double scale = (Content as FrameworkElement)?.XamlRoot?.RasterizationScale ?? 1.0; + if (scale <= 0) + { + scale = 1.0; + } + + CustomDragRegion.MinWidth = AppWindow.TitleBar.RightInset / scale; + } + + /// + /// Creates a new tab with the given header and navigates it to the specified page type. + /// + private TabViewItem AddTab(string header, System.Type pageType) + { + var tab = new TabViewItem + { + Header = header, + IconSource = new SymbolIconSource { Symbol = Symbol.Document } + }; + + var frame = new Frame(); + frame.Navigate(pageType); + tab.Content = frame; + + TabControl.TabItems.Add(tab); + return tab; + } + + /// + /// Called when the user clicks the "+" button to add a new tab. + /// + private void TabControl_AddTabButtonClick(TabView sender, object args) + { + _tabCounter++; + var tab = AddTab($"New Tab {_tabCounter}", typeof(HomePage)); + sender.SelectedItem = tab; + } + + /// + /// Called when a tab's close button is clicked. + /// Closes the window if the last tab is removed. + /// + private void TabControl_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args) + { + sender.TabItems.Remove(args.Tab); + + if (sender.TabItems.Count == 0) + { + Close(); + } + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Package-managed.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Package-managed.appxmanifest new file mode 100644 index 0000000000..980d0b475c --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Package-managed.appxmanifest @@ -0,0 +1,53 @@ + + + + + + + + + + $projectname$ + $XmlEscapedPublisher$ + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/AboutPage.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/AboutPage.xaml new file mode 100644 index 0000000000..5bd3b2e041 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/AboutPage.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/AboutPage.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/AboutPage.xaml.cs new file mode 100644 index 0000000000..0b4934adcc --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/AboutPage.xaml.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.UI.Xaml.Controls; + +namespace $safeprojectname$.Pages; + +public sealed partial class AboutPage : Page +{ + public AboutPage() + { + InitializeComponent(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/HomePage.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/HomePage.xaml new file mode 100644 index 0000000000..9db78fa9fe --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/HomePage.xaml @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/HomePage.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/HomePage.xaml.cs new file mode 100644 index 0000000000..c2cab60d76 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Pages/HomePage.xaml.cs @@ -0,0 +1,14 @@ +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + +using Microsoft.UI.Xaml.Controls; + +namespace $safeprojectname$.Pages; + +public sealed partial class HomePage : Page +{ + public HomePage() + { + InitializeComponent(); + } +} diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/ProjectTemplate.csproj new file mode 100644 index 0000000000..7589d99c4c --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/ProjectTemplate.csproj @@ -0,0 +1,75 @@ + + + WinExe + $DotNetVersion$-windows10.0.26100.0 + 10.0.17763.0 + $safeprojectname$ + app.manifest + x86;x64;ARM64 + win-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) + win-$(Platform).pubxml + true + false + true + enable + enable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + False + True + False + True + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-arm64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-arm64.pubxml new file mode 100644 index 0000000000..8953cce984 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-arm64.pubxml @@ -0,0 +1,14 @@ + + + + + FileSystem + ARM64 + win-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-x64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 0000000000..cd995617c0 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,14 @@ + + + + + FileSystem + x64 + win-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-x86.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-x86.pubxml new file mode 100644 index 0000000000..a70c69425f --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/PublishProfiles/win-x86.pubxml @@ -0,0 +1,14 @@ + + + + + FileSystem + x86 + win-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/launchSettings.json b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/launchSettings.json new file mode 100644 index 0000000000..e25cd6a4f8 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "$projectname$ (Package)": { + "commandName": "MsixPackage" + }, + "$projectname$ (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.csproj new file mode 100644 index 0000000000..c5979d7301 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.csproj @@ -0,0 +1,94 @@ + + + + 15.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + Debug + AnyCPU + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {A1B2C3D4-1111-4A5B-9C8D-1E2F3A4B5C6D} + Library + Properties + WinUI.Desktop.Cs.TabViewApp + WinUI.Desktop.Cs.TabViewApp + v4.7.2 + 512 + false + false + false + false + false + false + false + false + false + false + SHA256 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + Designer + + + + + + + Designer + + + Designer + + + + + Designer + + + + Designer + + + + + + + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.ico new file mode 100644 index 0000000000..bb2ced4899 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.ico differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.png new file mode 100644 index 0000000000..a112563b52 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.vstemplate new file mode 100644 index 0000000000..2b300d62ee --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/WinUI.Desktop.Cs.TabViewApp.vstemplate @@ -0,0 +1,74 @@ + + + + + + WinUI.Desktop.Cs.TabViewApp.ico + Microsoft.WinUI.Desktop.Cs.TabViewApp + WinRT-Managed + CSharp + true + App + true + Enabled + true + 2 + Windows + true + WinUI.Desktop.Cs.TabViewApp.png + true + csharp + XAML + windows + desktop + WinUI + + + + + + + + + Properties\launchSettings.json + Properties\PublishProfiles\win-arm64.pubxml + Properties\PublishProfiles\win-x64.pubxml + Properties\PublishProfiles\win-x86.pubxml + app.manifest + App.xaml + App.xaml.cs + MainWindow.xaml + MainWindow.xaml.cs + Package-managed.appxmanifest + + HomePage.xaml + HomePage.xaml.cs + AboutPage.xaml + AboutPage.xaml.cs + + + SplashScreen.scale-200.png + LockScreenLogo.scale-200.png + Square150x150Logo.scale-200.png + Square44x44Logo.scale-200.png + Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png + StoreLogo.png + AppIcon.ico + Wide310x150Logo.scale-200.png + + + + + + + + + Microsoft.VisualStudio.WinRT.TemplateWizards, Version=16.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Microsoft.VisualStudio.WinRT.TemplateWizards.UpdatePublisherInManifestWizard + + + WindowsAppSDK.Cs.Extension.Dev17, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + WindowsAppSDK.TemplateUtilities.NuGetPackageInstaller + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/app.manifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/app.manifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/TabViewApp/app.manifest diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/LockScreenLogo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/StoreLogo.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Package-managed.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Package-managed.appxmanifest new file mode 100644 index 0000000000..980d0b475c --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Package-managed.appxmanifest @@ -0,0 +1,53 @@ + + + + + + + + + + $projectname$ + $XmlEscapedPublisher$ + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/ProjectTemplate.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/ProjectTemplate.csproj similarity index 59% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/ProjectTemplate.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/ProjectTemplate.csproj index 3d82c137a9..764fe149c1 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/ProjectTemplate.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/ProjectTemplate.csproj @@ -1,16 +1,17 @@ WinExe - $DotNetVersion$-windows10.0.19041.0 + $DotNetVersion$-windows10.0.26100.0 10.0.17763.0 $safeprojectname$ app.manifest x86;x64;ARM64 - win-x86;win-x64;win-arm64 - win-$(Platform).pubxml + win-$([System.Runtime.InteropServices.RuntimeInformation]::ProcessArchitecture.ToString().ToLowerInvariant()) + win-$(Platform).pubxml true false true + enable enable @@ -26,6 +27,7 @@ + @@ -43,6 +45,26 @@ + + + + + + FileSystem + ARM64 + win-arm64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x64.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x64.pubxml new file mode 100644 index 0000000000..cd995617c0 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x64.pubxml @@ -0,0 +1,14 @@ + + + + + FileSystem + x64 + win-x64 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x86.pubxml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x86.pubxml new file mode 100644 index 0000000000..a70c69425f --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/PublishProfiles/win-x86.pubxml @@ -0,0 +1,14 @@ + + + + + FileSystem + x86 + win-x86 + bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\ + true + False + + \ No newline at end of file diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/launchSettings.json b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/launchSettings.json new file mode 100644 index 0000000000..e25cd6a4f8 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/Properties/launchSettings.json @@ -0,0 +1,10 @@ +{ + "profiles": { + "$projectname$ (Package)": { + "commandName": "MsixPackage" + }, + "$projectname$ (Unpackaged)": { + "commandName": "Project" + } + } +} \ No newline at end of file diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml.cs similarity index 90% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml.cs rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml.cs index b6eefff4f8..f403c53bbb 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml.cs +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestApp.xaml.cs @@ -1,9 +1,4 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.ApplicationModel; +using Windows.ApplicationModel; using Windows.ApplicationModel.Activation; using Windows.Foundation; using Windows.Foundation.Collections; diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml.cs similarity index 81% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml.cs rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml.cs index b3db8f9eda..b4a66a02eb 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml.cs +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTestAppWindow.xaml.cs @@ -1,8 +1,3 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation; using Windows.Foundation.Collections; using Microsoft.UI.Xaml; diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTests.cs b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTests.cs similarity index 88% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTests.cs rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTests.cs index 58f0b468f9..3963e7486e 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTests.cs +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/UnitTests.cs @@ -1,9 +1,6 @@ using Microsoft.UI.Xaml.Controls; using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting.AppContainer; -using System; -using System.Collections.Generic; -using System.Linq; namespace $safeprojectname$; diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.csproj similarity index 98% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.csproj index 4d7748e3c7..173cdd8a37 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.csproj @@ -74,6 +74,7 @@ + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.vstemplate similarity index 96% rename from dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.vstemplate index 90cdd3a246..d5fb8f612a 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.vstemplate +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/WinUI.Desktop.Cs.UnitTestApp.vstemplate @@ -46,6 +46,7 @@ Square150x150Logo.scale-200.png Square44x44Logo.scale-200.png Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png StoreLogo.png Wide310x150Logo.scale-200.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/app.manifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/app.manifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CSharp/UnitTestApp/app.manifest diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.h diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.xaml new file mode 100644 index 0000000000..65073698c1 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.h diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.idl b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.idl similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.idl rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.idl diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/MainWindow.xaml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj.filters b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj.filters similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj.filters rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/ProjectTemplate.vcxproj.filters diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.vstemplate similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/WinUI.Desktop.CppWinRT.BlankApp.vstemplate diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/app.manifest new file mode 100644 index 0000000000..0f7e64319f --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/app.manifest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + PerMonitorV2 + + + \ No newline at end of file diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/pch.h diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/readme.txt b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/readme.txt similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/readme.txt rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/BlankApp/readme.txt diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/LockScreenLogo.scale-200.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Package-managed.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Package-managed.appxmanifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Package-managed.appxmanifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Package-managed.appxmanifest diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/StoreLogo.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.wapproj b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.wapproj similarity index 97% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.wapproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.wapproj index 25d166c490..de6d40d79d 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.wapproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WapProjTemplate.wapproj @@ -67,6 +67,7 @@ + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Wide310x150Logo.scale-200.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WinUI.Desktop.CppWinRT.WapProj.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WinUI.Desktop.CppWinRT.WapProj.vstemplate similarity index 95% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WinUI.Desktop.CppWinRT.WapProj.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WinUI.Desktop.CppWinRT.WapProj.vstemplate index 11144c5d9f..1e8db89c9d 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WinUI.Desktop.CppWinRT.WapProj.vstemplate +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/WinUI.Desktop.CppWinRT.WapProj.vstemplate @@ -31,6 +31,7 @@ Square150x150Logo.scale-200.png Square44x44Logo.scale-200.png Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png StoreLogo.png Wide310x150Logo.scale-200.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.csproj similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.csproj diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.vstemplate similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WinUI.Desktop.CppWinRT.PackagedApp.vstemplate diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.h diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.xaml new file mode 100644 index 0000000000..65073698c1 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/StoreLogo.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.h diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.idl b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.idl similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.idl rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.idl diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/MainWindow.xaml diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Package-native.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Package-native.appxmanifest new file mode 100644 index 0000000000..980d0b475c --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Package-native.appxmanifest @@ -0,0 +1,53 @@ + + + + + + + + + + $projectname$ + $XmlEscapedPublisher$ + Assets\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj similarity index 98% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj index 4e5ed00a7d..295fe353b4 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj @@ -149,6 +149,7 @@ + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj.filters b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj.filters similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj.filters rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/ProjectTemplate.vcxproj.filters diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj similarity index 98% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj index 49a8b9786f..ead9f40aeb 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj @@ -59,6 +59,7 @@ + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.vstemplate similarity index 96% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.vstemplate index d7d3d37f24..3f5e070d2d 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.vstemplate +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.vstemplate @@ -42,6 +42,7 @@ Square150x150Logo.scale-200.png Square44x44Logo.scale-200.png Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png StoreLogo.png Wide310x150Logo.scale-200.png diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/app.manifest new file mode 100644 index 0000000000..0f7e64319f --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/app.manifest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + PerMonitorV2 + + + \ No newline at end of file diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/pch.h diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/readme.txt b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/readme.txt similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/readme.txt rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/readme.txt diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.h diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.xaml new file mode 100644 index 0000000000..65073698c1 --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/App.xaml @@ -0,0 +1,16 @@ + + + + + + + + + + + + diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/LockScreenLogo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/LockScreenLogo.scale-200.png new file mode 100644 index 0000000000..33f889e106 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/LockScreenLogo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/SplashScreen.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/SplashScreen.scale-200.png new file mode 100644 index 0000000000..802c79d6d7 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/SplashScreen.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square150x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square150x150Logo.scale-200.png new file mode 100644 index 0000000000..ddba42adbb Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square150x150Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.scale-200.png new file mode 100644 index 0000000000..9327dd748e Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.scale-200.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 0000000000..e51416a8e4 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png new file mode 100644 index 0000000000..bf063eb4d6 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-48_altform-lightunplated.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/StoreLogo.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/StoreLogo.png new file mode 100644 index 0000000000..be865f0c37 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/StoreLogo.png differ diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Wide310x150Logo.scale-200.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Wide310x150Logo.scale-200.png new file mode 100644 index 0000000000..314d297f20 Binary files /dev/null and b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Wide310x150Logo.scale-200.png differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.h diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.idl b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.idl similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.idl rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.idl diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.xaml b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.xaml similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.xaml rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/MainWindow.xaml diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Package-native.appxmanifest b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Package-native.appxmanifest similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Package-native.appxmanifest rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Package-native.appxmanifest diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj similarity index 98% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj index 7f76e991c0..cd40c42c27 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj @@ -166,6 +166,7 @@ + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj.filters b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj.filters similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj.filters rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/ProjectTemplate.vcxproj.filters diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/UnitTests.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/UnitTests.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/UnitTests.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/UnitTests.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.csproj b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.csproj similarity index 98% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.csproj rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.csproj index c420157e2c..65c7a9ae5a 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.csproj +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.csproj @@ -59,6 +59,7 @@ + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.ico b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.ico rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.ico diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.png b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.png rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.png diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.vstemplate b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.vstemplate similarity index 96% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.vstemplate rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.vstemplate index f42e989a57..ff0b1c10bf 100644 --- a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.vstemplate +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/WinUI.Desktop.CppWinRT.UnitTestApp.vstemplate @@ -44,6 +44,7 @@ Square150x150Logo.scale-200.png Square44x44Logo.scale-200.png Square44x44Logo.targetsize-24_altform-unplated.png + Square44x44Logo.targetsize-48_altform-lightunplated.png StoreLogo.png Wide310x150Logo.scale-200.png diff --git a/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/app.manifest b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/app.manifest new file mode 100644 index 0000000000..0f7e64319f --- /dev/null +++ b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/app.manifest @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + PerMonitorV2 + + + \ No newline at end of file diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.cpp b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.cpp rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.cpp diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.h b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.h rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/pch.h diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/readme.txt b/dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/readme.txt similarity index 100% rename from dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/readme.txt rename to dev/Templates/Source/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/readme.txt diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.cpp b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.cpp rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.cpp diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.h b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.h rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.h diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.idl b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.idl similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.idl rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/Class.idl diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj.filters b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj.filters similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj.filters rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/ProjectTemplate.vcxproj.filters diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/RuntimeComponent.def b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/RuntimeComponent.def similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/RuntimeComponent.def rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/RuntimeComponent.def diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.csproj b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.csproj similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.csproj rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.csproj diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.ico b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.ico similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.ico rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.ico diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.png b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.png similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.png rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.png diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.vstemplate b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.vstemplate similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.vstemplate rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/WinUI.Neutral.CppWinRT.RuntimeComponent.vstemplate diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.cpp b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.cpp similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.cpp rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.cpp diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.h b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.h similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.h rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/pch.h diff --git a/dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/readme.txt b/dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/readme.txt similarity index 100% rename from dev/VSIX/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/readme.txt rename to dev/Templates/Source/ProjectTemplates/Neutral/CppWinRT/RuntimeComponent/readme.txt diff --git a/dev/VSIX/Directory.Build.props b/dev/Templates/VSIX/Directory.Build.props similarity index 57% rename from dev/VSIX/Directory.Build.props rename to dev/Templates/VSIX/Directory.Build.props index fd28148549..e3a4539f9b 100644 --- a/dev/VSIX/Directory.Build.props +++ b/dev/Templates/VSIX/Directory.Build.props @@ -1,34 +1,22 @@ - + + - - 2.0.230706.1 - 10.0.26100.4654 - 1.0.220914.1 - - 1.0.0-preview1 - Standalone false - - true - + - $(MSBuildThisFileDirectory)..\..\ $(MSBuildThisFileDirectory) $(VSIXRootDir)Extension\ - $(VSIXRootDir)ItemTemplates\ - $(VSIXRootDir)ProjectTemplates\ Debug AnyCPU - false 17.0 $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) true diff --git a/dev/VSIX/Extension/Cpp/Common/VSPackage.Designer.cs b/dev/Templates/VSIX/Extension/Cpp/Common/VSPackage.Designer.cs similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/VSPackage.Designer.cs rename to dev/Templates/VSIX/Extension/Cpp/Common/VSPackage.Designer.cs diff --git a/dev/VSIX/Extension/Cpp/Common/VSPackage.resx b/dev/Templates/VSIX/Extension/Cpp/Common/VSPackage.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/VSPackage.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/VSPackage.resx diff --git a/dev/VSIX/Extension/Cpp/Common/cs-CZ/VSPackage.cs-CZ.resx b/dev/Templates/VSIX/Extension/Cpp/Common/cs-CZ/VSPackage.cs-CZ.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/cs-CZ/VSPackage.cs-CZ.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/cs-CZ/VSPackage.cs-CZ.resx diff --git a/dev/VSIX/Extension/Cpp/Common/de-DE/VSPackage.de-DE.resx b/dev/Templates/VSIX/Extension/Cpp/Common/de-DE/VSPackage.de-DE.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/de-DE/VSPackage.de-DE.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/de-DE/VSPackage.de-DE.resx diff --git a/dev/VSIX/Extension/Cpp/Common/en-US/VSPackage.en-US.resx b/dev/Templates/VSIX/Extension/Cpp/Common/en-US/VSPackage.en-US.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/en-US/VSPackage.en-US.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/en-US/VSPackage.en-US.resx diff --git a/dev/VSIX/Extension/Cpp/Common/es-ES/VSPackage.es-ES.resx b/dev/Templates/VSIX/Extension/Cpp/Common/es-ES/VSPackage.es-ES.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/es-ES/VSPackage.es-ES.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/es-ES/VSPackage.es-ES.resx diff --git a/dev/VSIX/Extension/Cpp/Common/fr-FR/VSPackage.fr-FR.resx b/dev/Templates/VSIX/Extension/Cpp/Common/fr-FR/VSPackage.fr-FR.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/fr-FR/VSPackage.fr-FR.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/fr-FR/VSPackage.fr-FR.resx diff --git a/dev/VSIX/Extension/Cpp/Common/it-IT/VSPackage.it-IT.resx b/dev/Templates/VSIX/Extension/Cpp/Common/it-IT/VSPackage.it-IT.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/it-IT/VSPackage.it-IT.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/it-IT/VSPackage.it-IT.resx diff --git a/dev/VSIX/Extension/Cpp/Common/ja-JP/VSPackage.ja-JP.resx b/dev/Templates/VSIX/Extension/Cpp/Common/ja-JP/VSPackage.ja-JP.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/ja-JP/VSPackage.ja-JP.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/ja-JP/VSPackage.ja-JP.resx diff --git a/dev/VSIX/Extension/Cpp/Common/ko-KR/VSPackage.ko-KR.resx b/dev/Templates/VSIX/Extension/Cpp/Common/ko-KR/VSPackage.ko-KR.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/ko-KR/VSPackage.ko-KR.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/ko-KR/VSPackage.ko-KR.resx diff --git a/dev/VSIX/Extension/Cpp/Common/pl-PL/VSPackage.pl-PL.resx b/dev/Templates/VSIX/Extension/Cpp/Common/pl-PL/VSPackage.pl-PL.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/pl-PL/VSPackage.pl-PL.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/pl-PL/VSPackage.pl-PL.resx diff --git a/dev/VSIX/Extension/Cpp/Common/pt-BR/VSPackage.pt-BR.resx b/dev/Templates/VSIX/Extension/Cpp/Common/pt-BR/VSPackage.pt-BR.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/pt-BR/VSPackage.pt-BR.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/pt-BR/VSPackage.pt-BR.resx diff --git a/dev/VSIX/Extension/Cpp/Common/ru-RU/VSPackage.ru-RU.resx b/dev/Templates/VSIX/Extension/Cpp/Common/ru-RU/VSPackage.ru-RU.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/ru-RU/VSPackage.ru-RU.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/ru-RU/VSPackage.ru-RU.resx diff --git a/dev/VSIX/Extension/Cpp/Common/tr-TR/VSPackage.tr-TR.resx b/dev/Templates/VSIX/Extension/Cpp/Common/tr-TR/VSPackage.tr-TR.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/tr-TR/VSPackage.tr-TR.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/tr-TR/VSPackage.tr-TR.resx diff --git a/dev/VSIX/Extension/Cpp/Common/zh-CN/VSPackage.zh-CN.resx b/dev/Templates/VSIX/Extension/Cpp/Common/zh-CN/VSPackage.zh-CN.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/zh-CN/VSPackage.zh-CN.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/zh-CN/VSPackage.zh-CN.resx diff --git a/dev/VSIX/Extension/Cpp/Common/zh-TW/VSPackage.zh-TW.resx b/dev/Templates/VSIX/Extension/Cpp/Common/zh-TW/VSPackage.zh-TW.resx similarity index 100% rename from dev/VSIX/Extension/Cpp/Common/zh-TW/VSPackage.zh-TW.resx rename to dev/Templates/VSIX/Extension/Cpp/Common/zh-TW/VSPackage.zh-TW.resx diff --git a/dev/VSIX/Extension/Cpp/Dev17/Component/source.extension.vsixmanifest b/dev/Templates/VSIX/Extension/Cpp/Dev17/Component/source.extension.vsixmanifest similarity index 100% rename from dev/VSIX/Extension/Cpp/Dev17/Component/source.extension.vsixmanifest rename to dev/Templates/VSIX/Extension/Cpp/Dev17/Component/source.extension.vsixmanifest diff --git a/dev/VSIX/Extension/Cpp/Dev17/ExtensionPack.vsext b/dev/Templates/VSIX/Extension/Cpp/Dev17/ExtensionPack.vsext similarity index 100% rename from dev/VSIX/Extension/Cpp/Dev17/ExtensionPack.vsext rename to dev/Templates/VSIX/Extension/Cpp/Dev17/ExtensionPack.vsext diff --git a/dev/Templates/VSIX/Extension/Cpp/Dev17/LocalDev/source.extension.vsixmanifest b/dev/Templates/VSIX/Extension/Cpp/Dev17/LocalDev/source.extension.vsixmanifest new file mode 100644 index 0000000000..49c4398a9c --- /dev/null +++ b/dev/Templates/VSIX/Extension/Cpp/Dev17/LocalDev/source.extension.vsixmanifest @@ -0,0 +1,66 @@ + + + + + + Windows App SDK C++ VS Templates (LocalDev) + [LocalDev build] The Microsoft Windows App SDK Visual Studio extension adds C++ project and item templates to support building Windows apps and components in VS 2022-2026. This is a per-user dev-loop build that shadows any workload-shipped copy on the same machine. + https://github.com/microsoft/WindowsAppSDK/ + LICENSE + https://github.com/microsoft/WindowsAppSDK/ + https://github.com/microsoft/WindowsAppSDK/releases + WindowsAppSDK.png + WindowsAppSDK.png + WindowsAppSDK, WinAppSDK, WinUI, XAML, C++, C++/WinRT + + + + amd64 + + + amd64 + + + amd64 + + + arm64 + + + arm64 + + + arm64 + + + + + + + + + NuGet Package Manager + http://docs.microsoft.com/nuget/ + + + + + + + + + + + + + + + diff --git a/dev/VSIX/Extension/Cpp/Dev17/NuGetPackageList.cs b/dev/Templates/VSIX/Extension/Cpp/Dev17/NuGetPackageList.cs similarity index 100% rename from dev/VSIX/Extension/Cpp/Dev17/NuGetPackageList.cs rename to dev/Templates/VSIX/Extension/Cpp/Dev17/NuGetPackageList.cs diff --git a/dev/VSIX/Extension/Cpp/Dev17/Standalone/source.extension.vsixmanifest b/dev/Templates/VSIX/Extension/Cpp/Dev17/Standalone/source.extension.vsixmanifest similarity index 100% rename from dev/VSIX/Extension/Cpp/Dev17/Standalone/source.extension.vsixmanifest rename to dev/Templates/VSIX/Extension/Cpp/Dev17/Standalone/source.extension.vsixmanifest diff --git a/dev/VSIX/Extension/Cpp/Dev17/VSPackage.cs b/dev/Templates/VSIX/Extension/Cpp/Dev17/VSPackage.cs similarity index 100% rename from dev/VSIX/Extension/Cpp/Dev17/VSPackage.cs rename to dev/Templates/VSIX/Extension/Cpp/Dev17/VSPackage.cs diff --git a/dev/VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj b/dev/Templates/VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj similarity index 100% rename from dev/VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj rename to dev/Templates/VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj diff --git a/dev/VSIX/Extension/Cs/Common/VSPackage.Designer.cs b/dev/Templates/VSIX/Extension/Cs/Common/VSPackage.Designer.cs similarity index 89% rename from dev/VSIX/Extension/Cs/Common/VSPackage.Designer.cs rename to dev/Templates/VSIX/Extension/Cs/Common/VSPackage.Designer.cs index 1167253e0d..545d4e3a50 100644 --- a/dev/VSIX/Extension/Cs/Common/VSPackage.Designer.cs +++ b/dev/Templates/VSIX/Extension/Cs/Common/VSPackage.Designer.cs @@ -467,5 +467,59 @@ internal static string _1054 { return ResourceManager.GetString("1054", resourceCulture); } } + + /// + /// Looks up a localized string similar to WinUI TabView App. + /// + internal static string _1055 { + get { + return ResourceManager.GetString("1055", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Experimental] WinUI TabView App. + /// + internal static string _1056 { + get { + return ResourceManager.GetString("1056", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A project template for creating a WinUI app with a TabView control for tabbed navigation.. + /// + internal static string _1057 { + get { + return ResourceManager.GetString("1057", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to WinUI Navigation App. + /// + internal static string _1059 { + get { + return ResourceManager.GetString("1059", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to [Experimental] WinUI Navigation App. + /// + internal static string _1060 { + get { + return ResourceManager.GetString("1060", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to A project template for creating a WinUI app with a NavigationView control for page navigation.. + /// + internal static string _1061 { + get { + return ResourceManager.GetString("1061", resourceCulture); + } + } } } diff --git a/dev/VSIX/Extension/Cs/Common/VSPackage.resx b/dev/Templates/VSIX/Extension/Cs/Common/VSPackage.resx similarity index 90% rename from dev/VSIX/Extension/Cs/Common/VSPackage.resx rename to dev/Templates/VSIX/Extension/Cs/Common/VSPackage.resx index 7ceb082481..9fa8cce5f3 100644 --- a/dev/VSIX/Extension/Cs/Common/VSPackage.resx +++ b/dev/Templates/VSIX/Extension/Cs/Common/VSPackage.resx @@ -252,4 +252,31 @@ No output information available. + + WinUI TabView App + + + [Experimental] WinUI TabView App + + + A project template for creating a WinUI app with a TabView control for tabbed navigation. + + + WinUI Navigation App + + + [Experimental] WinUI Navigation App + + + A project template for creating a WinUI app with a NavigationView control for page navigation. + + + WinUI MVVM App + + + [Experimental] WinUI MVVM App + + + A project template for creating a WinUI app structured with the MVVM pattern using the CommunityToolkit.Mvvm package. + \ No newline at end of file diff --git a/dev/VSIX/Extension/Cs/Common/cs-CZ/VSPackage.cs-CZ.resx b/dev/Templates/VSIX/Extension/Cs/Common/cs-CZ/VSPackage.cs-CZ.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/cs-CZ/VSPackage.cs-CZ.resx rename to dev/Templates/VSIX/Extension/Cs/Common/cs-CZ/VSPackage.cs-CZ.resx diff --git a/dev/VSIX/Extension/Cs/Common/de-DE/VSPackage.de-DE.resx b/dev/Templates/VSIX/Extension/Cs/Common/de-DE/VSPackage.de-DE.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/de-DE/VSPackage.de-DE.resx rename to dev/Templates/VSIX/Extension/Cs/Common/de-DE/VSPackage.de-DE.resx diff --git a/dev/VSIX/Extension/Cs/Common/en-US/VSPackage.en-US.resx b/dev/Templates/VSIX/Extension/Cs/Common/en-US/VSPackage.en-US.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/en-US/VSPackage.en-US.resx rename to dev/Templates/VSIX/Extension/Cs/Common/en-US/VSPackage.en-US.resx diff --git a/dev/VSIX/Extension/Cs/Common/es-ES/VSPackage.es-ES.resx b/dev/Templates/VSIX/Extension/Cs/Common/es-ES/VSPackage.es-ES.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/es-ES/VSPackage.es-ES.resx rename to dev/Templates/VSIX/Extension/Cs/Common/es-ES/VSPackage.es-ES.resx diff --git a/dev/VSIX/Extension/Cs/Common/fr-FR/VSPackage.fr-FR.resx b/dev/Templates/VSIX/Extension/Cs/Common/fr-FR/VSPackage.fr-FR.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/fr-FR/VSPackage.fr-FR.resx rename to dev/Templates/VSIX/Extension/Cs/Common/fr-FR/VSPackage.fr-FR.resx diff --git a/dev/VSIX/Extension/Cs/Common/it-IT/VSPackage.it-IT.resx b/dev/Templates/VSIX/Extension/Cs/Common/it-IT/VSPackage.it-IT.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/it-IT/VSPackage.it-IT.resx rename to dev/Templates/VSIX/Extension/Cs/Common/it-IT/VSPackage.it-IT.resx diff --git a/dev/VSIX/Extension/Cs/Common/ja-JP/VSPackage.ja-JP.resx b/dev/Templates/VSIX/Extension/Cs/Common/ja-JP/VSPackage.ja-JP.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/ja-JP/VSPackage.ja-JP.resx rename to dev/Templates/VSIX/Extension/Cs/Common/ja-JP/VSPackage.ja-JP.resx diff --git a/dev/VSIX/Extension/Cs/Common/ko-KR/VSPackage.ko-KR.resx b/dev/Templates/VSIX/Extension/Cs/Common/ko-KR/VSPackage.ko-KR.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/ko-KR/VSPackage.ko-KR.resx rename to dev/Templates/VSIX/Extension/Cs/Common/ko-KR/VSPackage.ko-KR.resx diff --git a/dev/VSIX/Extension/Cs/Common/pl-PL/VSPackage.pl-PL.resx b/dev/Templates/VSIX/Extension/Cs/Common/pl-PL/VSPackage.pl-PL.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/pl-PL/VSPackage.pl-PL.resx rename to dev/Templates/VSIX/Extension/Cs/Common/pl-PL/VSPackage.pl-PL.resx diff --git a/dev/VSIX/Extension/Cs/Common/pt-BR/VSPackage.pt-BR.resx b/dev/Templates/VSIX/Extension/Cs/Common/pt-BR/VSPackage.pt-BR.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/pt-BR/VSPackage.pt-BR.resx rename to dev/Templates/VSIX/Extension/Cs/Common/pt-BR/VSPackage.pt-BR.resx diff --git a/dev/VSIX/Extension/Cs/Common/ru-RU/VSPackage.ru-RU.resx b/dev/Templates/VSIX/Extension/Cs/Common/ru-RU/VSPackage.ru-RU.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/ru-RU/VSPackage.ru-RU.resx rename to dev/Templates/VSIX/Extension/Cs/Common/ru-RU/VSPackage.ru-RU.resx diff --git a/dev/VSIX/Extension/Cs/Common/tr-TR/VSPackage.tr-TR.resx b/dev/Templates/VSIX/Extension/Cs/Common/tr-TR/VSPackage.tr-TR.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/tr-TR/VSPackage.tr-TR.resx rename to dev/Templates/VSIX/Extension/Cs/Common/tr-TR/VSPackage.tr-TR.resx diff --git a/dev/VSIX/Extension/Cs/Common/zh-CN/VSPackage.zh-CN.resx b/dev/Templates/VSIX/Extension/Cs/Common/zh-CN/VSPackage.zh-CN.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/zh-CN/VSPackage.zh-CN.resx rename to dev/Templates/VSIX/Extension/Cs/Common/zh-CN/VSPackage.zh-CN.resx diff --git a/dev/VSIX/Extension/Cs/Common/zh-TW/VSPackage.zh-TW.resx b/dev/Templates/VSIX/Extension/Cs/Common/zh-TW/VSPackage.zh-TW.resx similarity index 100% rename from dev/VSIX/Extension/Cs/Common/zh-TW/VSPackage.zh-TW.resx rename to dev/Templates/VSIX/Extension/Cs/Common/zh-TW/VSPackage.zh-TW.resx diff --git a/dev/VSIX/Extension/Cs/Dev17/Component/source.extension.vsixmanifest b/dev/Templates/VSIX/Extension/Cs/Dev17/Component/source.extension.vsixmanifest similarity index 77% rename from dev/VSIX/Extension/Cs/Dev17/Component/source.extension.vsixmanifest rename to dev/Templates/VSIX/Extension/Cs/Dev17/Component/source.extension.vsixmanifest index 1fb52bfa2e..1749810bc6 100644 --- a/dev/VSIX/Extension/Cs/Dev17/Component/source.extension.vsixmanifest +++ b/dev/Templates/VSIX/Extension/Cs/Dev17/Component/source.extension.vsixmanifest @@ -52,8 +52,14 @@ - + + + + + + + \ No newline at end of file diff --git a/dev/VSIX/Extension/Cs/Dev17/ExtensionPack.vsext b/dev/Templates/VSIX/Extension/Cs/Dev17/ExtensionPack.vsext similarity index 100% rename from dev/VSIX/Extension/Cs/Dev17/ExtensionPack.vsext rename to dev/Templates/VSIX/Extension/Cs/Dev17/ExtensionPack.vsext diff --git a/dev/Templates/VSIX/Extension/Cs/Dev17/LocalDev/source.extension.vsixmanifest b/dev/Templates/VSIX/Extension/Cs/Dev17/LocalDev/source.extension.vsixmanifest new file mode 100644 index 0000000000..ad1d752118 --- /dev/null +++ b/dev/Templates/VSIX/Extension/Cs/Dev17/LocalDev/source.extension.vsixmanifest @@ -0,0 +1,109 @@ + + + + + + Windows App SDK C# VS Templates (LocalDev) + [LocalDev build] The Microsoft Windows App SDK Visual Studio extension adds C# project and item templates to support building Windows apps and components in VS 2022-2026. This is a per-user dev-loop build that shadows any workload-shipped copy on the same machine. + https://github.com/microsoft/WindowsAppSDK/ + LICENSE + https://github.com/microsoft/WindowsAppSDK/ + https://github.com/microsoft/WindowsAppSDK/releases + WindowsAppSDK.png + WindowsAppSDK.png + WindowsAppSDK, WinAppSDK, WinUI, XAML, C#, Managed + + + + amd64 + + + amd64 + + + amd64 + + + arm64 + + + arm64 + + + arm64 + + + + + + + + + + + NuGet Package Manager + http://docs.microsoft.com/nuget/ + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/VSIX/Extension/Cs/Dev17/Standalone/source.extension.vsixmanifest b/dev/Templates/VSIX/Extension/Cs/Dev17/Standalone/source.extension.vsixmanifest similarity index 78% rename from dev/VSIX/Extension/Cs/Dev17/Standalone/source.extension.vsixmanifest rename to dev/Templates/VSIX/Extension/Cs/Dev17/Standalone/source.extension.vsixmanifest index bcda1fcae6..9b706ee653 100644 --- a/dev/VSIX/Extension/Cs/Dev17/Standalone/source.extension.vsixmanifest +++ b/dev/Templates/VSIX/Extension/Cs/Dev17/Standalone/source.extension.vsixmanifest @@ -52,8 +52,14 @@ - + + + + + + + diff --git a/dev/VSIX/Extension/Cs/Dev17/VSPackage.cs b/dev/Templates/VSIX/Extension/Cs/Dev17/VSPackage.cs similarity index 100% rename from dev/VSIX/Extension/Cs/Dev17/VSPackage.cs rename to dev/Templates/VSIX/Extension/Cs/Dev17/VSPackage.cs diff --git a/dev/VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj b/dev/Templates/VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj similarity index 67% rename from dev/VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj rename to dev/Templates/VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj index 39348a4bd3..149c56638a 100644 --- a/dev/VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj +++ b/dev/Templates/VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj @@ -1,5 +1,7 @@  + + 2.0 {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} @@ -27,8 +29,8 @@ true {B0F1BA01-DE66-4EF9-9C8B-DBB99FB4DA4B} - - net8.0 + + net10.0 @@ -86,74 +88,27 @@ + - - {9DE11F03-73A8-4DCA-88B3-1623A718DFD1} - WinUI.Desktop.Cs.BlankWindow - ItemTemplates - false - TemplateProjectOutputGroup%3b - - - {C8DA9E71-2F7F-4E7C-8DC7-766FF0F67196} - WinUI.Neutral.Cs.ResourceDictionary - ItemTemplates - false - TemplateProjectOutputGroup%3b - - - {17320A27-C039-4973-95AA-ACB3EFA1D47E} - WinUI.Neutral.Cs.Resw - ItemTemplates - false - TemplateProjectOutputGroup%3b - - - {F19716E6-41A1-4320-A819-288172CE161C} - WinUI.Neutral.Cs.UserControl - ItemTemplates - false - TemplateProjectOutputGroup%3b - - - {2d9bd73d-5a5e-4113-aea9-53d059a79a41} - WinUI.Neutral.Cs.BlankPage - ItemTemplates - false - TemplateProjectOutputGroup%3b - - - {2C5873D8-E908-41F2-B861-80F95280FBCA} - WinUI.Neutral.Cs.TemplatedControl - ItemTemplates - false - TemplateProjectOutputGroup%3b - - - {33783A04-0CB4-4CE5-A9FE-82E2E7E06D1F} - WinUI.Desktop.Cs.ClassLibrary + + %(BaseName) ProjectTemplates false TemplateProjectOutputGroup%3b - - {938DD23E-270E-488B-AC4C-CA68A545A8F2} - WinUI.Desktop.Cs.PackagedApp - ProjectTemplates - false - TemplateProjectOutputGroup%3b - - - {D9C038B7-6A62-4945-A030-4AC7597F53CA} - WinUI.Desktop.Cs.SingleProjectPackagedApp - ProjectTemplates - false - TemplateProjectOutputGroup%3b - - - {45777B9F-9CC1-47D7-BD66-C3C194277902} - WinUI.Desktop.Cs.UnitTestApp - ProjectTemplates + + + %(BaseName) + ItemTemplates false TemplateProjectOutputGroup%3b diff --git a/dev/VSIX/Extension/Directory.Build.targets b/dev/Templates/VSIX/Extension/Directory.Build.targets similarity index 100% rename from dev/VSIX/Extension/Directory.Build.targets rename to dev/Templates/VSIX/Extension/Directory.Build.targets diff --git a/dev/VSIX/Extension/LICENSE b/dev/Templates/VSIX/Extension/LICENSE similarity index 100% rename from dev/VSIX/Extension/LICENSE rename to dev/Templates/VSIX/Extension/LICENSE diff --git a/dev/VSIX/Extension/WindowsAppSDK.png b/dev/Templates/VSIX/Extension/WindowsAppSDK.png similarity index 100% rename from dev/VSIX/Extension/WindowsAppSDK.png rename to dev/Templates/VSIX/Extension/WindowsAppSDK.png diff --git a/dev/VSIX/Shared/OutputWindowHelper.cs b/dev/Templates/VSIX/Shared/OutputWindowHelper.cs similarity index 97% rename from dev/VSIX/Shared/OutputWindowHelper.cs rename to dev/Templates/VSIX/Shared/OutputWindowHelper.cs index 631469130d..517da9f35b 100644 --- a/dev/VSIX/Shared/OutputWindowHelper.cs +++ b/dev/Templates/VSIX/Shared/OutputWindowHelper.cs @@ -7,7 +7,7 @@ // Although the strings are the same in the wizard for both extensions, // they are included with both their respective VSPackages. -// Strings for both extensions can be found in {PathToWindowsAppSDK}\dev\VSIX\Extension\Cs\Common\VSPackage.resx +// Strings for both extensions can be found in {PathToWindowsAppSDK}\dev\Templates\VSIX\Extension\Cs\Common\VSPackage.resx // Wizard strings are numbers 1044 and above. #if CSHARP_EXTENSION using Resources = WindowsAppSDK.Cs.Extension.Dev17.VSPackage; diff --git a/dev/VSIX/Shared/WizardImplementation.cs b/dev/Templates/VSIX/Shared/WizardImplementation.cs similarity index 99% rename from dev/VSIX/Shared/WizardImplementation.cs rename to dev/Templates/VSIX/Shared/WizardImplementation.cs index 58f11c0d46..9efc116f77 100644 --- a/dev/VSIX/Shared/WizardImplementation.cs +++ b/dev/Templates/VSIX/Shared/WizardImplementation.cs @@ -18,7 +18,7 @@ // Although the strings are the same in the wizard for both extensions, // they are included with both their respective VSPackages. -// Strings for both extensions can be found in {PathToWindowsAppSDK}\dev\VSIX\Extension\Cs\Common\VSPackage.resx +// Strings for both extensions can be found in {PathToWindowsAppSDK}\dev\Templates\VSIX\Extension\Cs\Common\VSPackage.resx // Wizard strings are numbers 1044 and above. #if CSHARP_EXTENSION using Resources = WindowsAppSDK.Cs.Extension.Dev17.VSPackage; diff --git a/dev/VSIX/Shared/WizardInfoBarEvents.cs b/dev/Templates/VSIX/Shared/WizardInfoBarEvents.cs similarity index 100% rename from dev/VSIX/Shared/WizardInfoBarEvents.cs rename to dev/Templates/VSIX/Shared/WizardInfoBarEvents.cs diff --git a/dev/VSIX/WindowsAppSDK.Extension.sln b/dev/Templates/VSIX/WindowsAppSDK.Extension.sln similarity index 69% rename from dev/VSIX/WindowsAppSDK.Extension.sln rename to dev/Templates/VSIX/WindowsAppSDK.Extension.sln index d74763eb35..4b5f35d0ea 100644 --- a/dev/VSIX/WindowsAppSDK.Extension.sln +++ b/dev/Templates/VSIX/WindowsAppSDK.Extension.sln @@ -1,11 +1,13 @@ - + Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.0.31619.372 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.BlankPage", "ItemTemplates\Neutral\CSharp\BlankPage\WinUI.Neutral.Cs.BlankPage.csproj", "{2D9BD73D-5A5E-4113-AEA9-53D059A79A41}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.BlankPage", "..\Source\ItemTemplates\Neutral\CSharp\BlankPage\WinUI.Neutral.Cs.BlankPage.csproj", "{2D9BD73D-5A5E-4113-AEA9-53D059A79A41}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.UserControl", "ItemTemplates\Neutral\CSharp\UserControl\WinUI.Neutral.Cs.UserControl.csproj", "{F19716E6-41A1-4320-A819-288172CE161C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.UserControl", "..\Source\ItemTemplates\Neutral\CSharp\UserControl\WinUI.Neutral.Cs.UserControl.csproj", "{F19716E6-41A1-4320-A819-288172CE161C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.ContentDialog", "..\Source\ItemTemplates\Neutral\CSharp\ContentDialog\WinUI.Neutral.Cs.ContentDialog.csproj", "{E5209752-4CE6-413B-B3BE-61E33C106A5E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ProjectTemplates", "ProjectTemplates", "{34272930-CFC7-4E33-9DB9-88E82AE2C046}" EndProject @@ -21,21 +23,21 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CppWinRT", "CppWinRT", "{CD EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CppWinRT", "CppWinRT", "{1F0ED7C6-3679-4288-9CEA-7B30437D3FA6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.BlankPage", "ItemTemplates\Neutral\CppWinRT\BlankPage\WinUI.Neutral.CppWinRT.BlankPage.csproj", "{1E071372-7CB7-47BC-9BA2-8235F9BB09C8}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.BlankPage", "..\Source\ItemTemplates\Neutral\CppWinRT\BlankPage\WinUI.Neutral.CppWinRT.BlankPage.csproj", "{1E071372-7CB7-47BC-9BA2-8235F9BB09C8}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.UserControl", "ItemTemplates\Neutral\CppWinRT\UserControl\WinUI.Neutral.CppWinRT.UserControl.csproj", "{99C19C7C-6472-44F6-89E2-389AB6534F42}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.UserControl", "..\Source\ItemTemplates\Neutral\CppWinRT\UserControl\WinUI.Neutral.CppWinRT.UserControl.csproj", "{99C19C7C-6472-44F6-89E2-389AB6534F42}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.TemplatedControl", "ItemTemplates\Neutral\CSharp\TemplatedControl\WinUI.Neutral.Cs.TemplatedControl.csproj", "{2C5873D8-E908-41F2-B861-80F95280FBCA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.TemplatedControl", "..\Source\ItemTemplates\Neutral\CSharp\TemplatedControl\WinUI.Neutral.Cs.TemplatedControl.csproj", "{2C5873D8-E908-41F2-B861-80F95280FBCA}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Desktop", "Desktop", "{F27A31A1-917C-4E75-B2A5-EEC55B287150}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CppWinRT", "CppWinRT", "{1A8A7481-2108-496B-802D-39F9C08D86F3}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.BlankWindow", "ItemTemplates\Desktop\CppWinRT\BlankWindow\WinUI.Desktop.CppWinRT.BlankWindow.csproj", "{81221BE8-00A2-4841-B62C-9E751C298066}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.BlankWindow", "..\Source\ItemTemplates\Desktop\CppWinRT\BlankWindow\WinUI.Desktop.CppWinRT.BlankWindow.csproj", "{81221BE8-00A2-4841-B62C-9E751C298066}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.TemplatedControl", "ItemTemplates\Neutral\CppWinRT\TemplatedControl\WinUI.Neutral.CppWinRT.TemplatedControl.csproj", "{761212D7-B5D2-4629-98C8-88F6A24982BB}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.TemplatedControl", "..\Source\ItemTemplates\Neutral\CppWinRT\TemplatedControl\WinUI.Neutral.CppWinRT.TemplatedControl.csproj", "{761212D7-B5D2-4629-98C8-88F6A24982BB}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.BlankWindow", "ItemTemplates\Desktop\CSharp\BlankWindow\WinUI.Desktop.Cs.BlankWindow.csproj", "{9DE11F03-73A8-4DCA-88B3-1623A718DFD1}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.BlankWindow", "..\Source\ItemTemplates\Desktop\CSharp\BlankWindow\WinUI.Desktop.Cs.BlankWindow.csproj", "{9DE11F03-73A8-4DCA-88B3-1623A718DFD1}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Desktop", "Desktop", "{E7C0B105-E6A4-43E4-AC0F-5D4F5CDDC395}" EndProject @@ -43,9 +45,9 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CppWinRT", "CppWinRT", "{9C EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CSharp", "CSharp", "{01EE62F3-3B99-43B0-9E99-29FA871D48E2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.ResourceDictionary", "ItemTemplates\Neutral\CppWinRT\ResourceDictionary\WinUI.Neutral.CppWinRT.ResourceDictionary.csproj", "{3F3F0E7F-594F-4006-A3EF-5E5624EF147C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.ResourceDictionary", "..\Source\ItemTemplates\Neutral\CppWinRT\ResourceDictionary\WinUI.Neutral.CppWinRT.ResourceDictionary.csproj", "{3F3F0E7F-594F-4006-A3EF-5E5624EF147C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.ResourceDictionary", "ItemTemplates\Neutral\CSharp\ResourceDictionary\WinUI.Neutral.Cs.ResourceDictionary.csproj", "{C8DA9E71-2F7F-4E7C-8DC7-766FF0F67196}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.ResourceDictionary", "..\Source\ItemTemplates\Neutral\CSharp\ResourceDictionary\WinUI.Neutral.Cs.ResourceDictionary.csproj", "{C8DA9E71-2F7F-4E7C-8DC7-766FF0F67196}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BCBB50CD-2C38-4B27-940B-1FEDD2C6DECE}" ProjectSection(SolutionItems) = preProject @@ -54,35 +56,45 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution update-package-versions.targets = update-package-versions.targets EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.Resw", "ItemTemplates\Neutral\CppWinRT\Resw\WinUI.Neutral.CppWinRT.Resw.csproj", "{30AB0000-148D-48BE-85DB-70D9F7BDFEC5}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.Resw", "..\Source\ItemTemplates\Neutral\CppWinRT\Resw\WinUI.Neutral.CppWinRT.Resw.csproj", "{30AB0000-148D-48BE-85DB-70D9F7BDFEC5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.Resw", "ItemTemplates\Neutral\CSharp\Resw\WinUI.Neutral.Cs.Resw.csproj", "{17320A27-C039-4973-95AA-ACB3EFA1D47E}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.Cs.Resw", "..\Source\ItemTemplates\Neutral\CSharp\Resw\WinUI.Neutral.Cs.Resw.csproj", "{17320A27-C039-4973-95AA-ACB3EFA1D47E}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CSharp", "CSharp", "{EC44EE95-8EC9-4EE5-A8A6-E6BE2F32C843}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.ClassLibrary", "ProjectTemplates\Desktop\CSharp\ClassLibrary\WinUI.Desktop.Cs.ClassLibrary.csproj", "{33783A04-0CB4-4CE5-A9FE-82E2E7E06D1F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.ClassLibrary", "..\Source\ProjectTemplates\Desktop\CSharp\ClassLibrary\WinUI.Desktop.Cs.ClassLibrary.csproj", "{33783A04-0CB4-4CE5-A9FE-82E2E7E06D1F}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.PackagedApp", "ProjectTemplates\Desktop\CSharp\PackagedApp\WinUI.Desktop.Cs.PackagedApp.csproj", "{938DD23E-270E-488B-AC4C-CA68A545A8F2}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.PackagedApp", "..\Source\ProjectTemplates\Desktop\CSharp\PackagedApp\WinUI.Desktop.Cs.PackagedApp.csproj", "{938DD23E-270E-488B-AC4C-CA68A545A8F2}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.PackagedApp", "ProjectTemplates\Desktop\CppWinRT\PackagedApp\WinUI.Desktop.CppWinRT.PackagedApp.csproj", "{80195619-D4CF-4287-BA59-08077486BE1C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.PackagedApp", "..\Source\ProjectTemplates\Desktop\CppWinRT\PackagedApp\WinUI.Desktop.CppWinRT.PackagedApp.csproj", "{80195619-D4CF-4287-BA59-08077486BE1C}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Neutral", "Neutral", "{50DEEF87-BC2F-4B45-B97D-B83135F12786}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CppWinRT", "CppWinRT", "{4D266288-D49F-46D4-90E0-667E81D6A433}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.RuntimeComponent", "ProjectTemplates\Neutral\CppWinRT\RuntimeComponent\WinUI.Neutral.CppWinRT.RuntimeComponent.csproj", "{FD33E535-127D-48AC-8788-0F61FA2A251C}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Neutral.CppWinRT.RuntimeComponent", "..\Source\ProjectTemplates\Neutral\CppWinRT\RuntimeComponent\WinUI.Neutral.CppWinRT.RuntimeComponent.csproj", "{FD33E535-127D-48AC-8788-0F61FA2A251C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.SingleProjectPackagedApp", "ProjectTemplates\Desktop\CSharp\SingleProjectPackagedApp\WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj", "{D9C038B7-6A62-4945-A030-4AC7597F53CA}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.SingleProjectPackagedApp", "..\Source\ProjectTemplates\Desktop\CSharp\SingleProjectPackagedApp\WinUI.Desktop.Cs.SingleProjectPackagedApp.csproj", "{D9C038B7-6A62-4945-A030-4AC7597F53CA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.SingleProjectPackagedApp", "ProjectTemplates\Desktop\CppWinRT\SingleProjectPackagedApp\WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj", "{E54D1AD4-E935-479D-8A69-FC073E4DB33D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.SingleProjectPackagedApp", "..\Source\ProjectTemplates\Desktop\CppWinRT\SingleProjectPackagedApp\WinUI.Desktop.CppWinRT.SingleProjectPackagedApp.csproj", "{E54D1AD4-E935-479D-8A69-FC073E4DB33D}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsAppSDK.Cs.Extension.Dev17", "Extension\Cs\Dev17\WindowsAppSDK.Cs.Extension.Dev17.csproj", "{E700DF09-42A9-4AC7-9855-400029FBFDBE}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsAppSDK.Cpp.Extension.Dev17", "Extension\Cpp\Dev17\WindowsAppSDK.Cpp.Extension.Dev17.csproj", "{85E88201-049C-4E42-AE85-DFEEFA7C533C}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.UnitTestApp", "ProjectTemplates\Desktop\CSharp\UnitTestApp\WinUI.Desktop.Cs.UnitTestApp.csproj", "{45777B9F-9CC1-47D7-BD66-C3C194277902}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.UnitTestApp", "..\Source\ProjectTemplates\Desktop\CSharp\UnitTestApp\WinUI.Desktop.Cs.UnitTestApp.csproj", "{45777B9F-9CC1-47D7-BD66-C3C194277902}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.UnitTestApp", "..\Source\ProjectTemplates\Desktop\CppWinRT\UnitTestApp\WinUI.Desktop.CppWinRT.UnitTestApp.csproj", "{DFA6B905-57A3-4B31-A74B-25BA2243389F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.TabViewApp", "..\Source\ProjectTemplates\Desktop\CSharp\TabViewApp\WinUI.Desktop.Cs.TabViewApp.csproj", "{A1B2C3D4-1111-4A5B-9C8D-1E2F3A4B5C6D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.NavigationApp", "..\Source\ProjectTemplates\Desktop\CSharp\NavigationApp\WinUI.Desktop.Cs.NavigationApp.csproj", "{B2C3D4E5-2222-4B6C-AD9E-2F3A4B5C6D7E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.Cs.MvvmApp", "..\Source\ProjectTemplates\Desktop\CSharp\MvvmApp\WinUI.Desktop.Cs.MvvmApp.csproj", "{C3D4E5F6-3333-4C7D-BE0F-3A4B5C6D7E8F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DotnetNewTemplates", "DotnetNewTemplates", "{8EAF0E4D-B0E3-4A21-B0F6-EA69F0215F5A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinUI.Desktop.CppWinRT.UnitTestApp", "ProjectTemplates\Desktop\CppWinRT\UnitTestApp\WinUI.Desktop.CppWinRT.UnitTestApp.csproj", "{DFA6B905-57A3-4B31-A74B-25BA2243389F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinAppSdk.CSharp.DotnetNewTemplates", "..\Dotnet\WinAppSdk.CSharp.DotnetNewTemplates.csproj", "{F9C3BC5E-2E45-4272-A4F1-0F63CFE9A2DE}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Shared", "Shared", "{96699B60-67B5-4186-9FEC-3963ED811FF0}" ProjectSection(SolutionItems) = preProject @@ -103,6 +115,10 @@ Global {F19716E6-41A1-4320-A819-288172CE161C}.Debug|Any CPU.Build.0 = Debug|Any CPU {F19716E6-41A1-4320-A819-288172CE161C}.Release|Any CPU.ActiveCfg = Release|Any CPU {F19716E6-41A1-4320-A819-288172CE161C}.Release|Any CPU.Build.0 = Release|Any CPU + {E5209752-4CE6-413B-B3BE-61E33C106A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E5209752-4CE6-413B-B3BE-61E33C106A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E5209752-4CE6-413B-B3BE-61E33C106A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E5209752-4CE6-413B-B3BE-61E33C106A5E}.Release|Any CPU.Build.0 = Release|Any CPU {1E071372-7CB7-47BC-9BA2-8235F9BB09C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {1E071372-7CB7-47BC-9BA2-8235F9BB09C8}.Debug|Any CPU.Build.0 = Debug|Any CPU {1E071372-7CB7-47BC-9BA2-8235F9BB09C8}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -183,6 +199,22 @@ Global {DFA6B905-57A3-4B31-A74B-25BA2243389F}.Debug|Any CPU.Build.0 = Debug|Any CPU {DFA6B905-57A3-4B31-A74B-25BA2243389F}.Release|Any CPU.ActiveCfg = Release|Any CPU {DFA6B905-57A3-4B31-A74B-25BA2243389F}.Release|Any CPU.Build.0 = Release|Any CPU + {A1B2C3D4-1111-4A5B-9C8D-1E2F3A4B5C6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A1B2C3D4-1111-4A5B-9C8D-1E2F3A4B5C6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A1B2C3D4-1111-4A5B-9C8D-1E2F3A4B5C6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A1B2C3D4-1111-4A5B-9C8D-1E2F3A4B5C6D}.Release|Any CPU.Build.0 = Release|Any CPU + {B2C3D4E5-2222-4B6C-AD9E-2F3A4B5C6D7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2C3D4E5-2222-4B6C-AD9E-2F3A4B5C6D7E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2C3D4E5-2222-4B6C-AD9E-2F3A4B5C6D7E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2C3D4E5-2222-4B6C-AD9E-2F3A4B5C6D7E}.Release|Any CPU.Build.0 = Release|Any CPU + {C3D4E5F6-3333-4C7D-BE0F-3A4B5C6D7E8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C3D4E5F6-3333-4C7D-BE0F-3A4B5C6D7E8F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C3D4E5F6-3333-4C7D-BE0F-3A4B5C6D7E8F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C3D4E5F6-3333-4C7D-BE0F-3A4B5C6D7E8F}.Release|Any CPU.Build.0 = Release|Any CPU + {F9C3BC5E-2E45-4272-A4F1-0F63CFE9A2DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F9C3BC5E-2E45-4272-A4F1-0F63CFE9A2DE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9C3BC5E-2E45-4272-A4F1-0F63CFE9A2DE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F9C3BC5E-2E45-4272-A4F1-0F63CFE9A2DE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -190,6 +222,7 @@ Global GlobalSection(NestedProjects) = preSolution {2D9BD73D-5A5E-4113-AEA9-53D059A79A41} = {46667165-BDC3-4FC2-9BC3-E4B1AEB1E05B} {F19716E6-41A1-4320-A819-288172CE161C} = {46667165-BDC3-4FC2-9BC3-E4B1AEB1E05B} + {E5209752-4CE6-413B-B3BE-61E33C106A5E} = {46667165-BDC3-4FC2-9BC3-E4B1AEB1E05B} {CD06AC1A-5DAA-4161-8D57-92D27C4FD911} = {63F11D46-2E6A-4B6A-B57B-CB83FFCAB63F} {46667165-BDC3-4FC2-9BC3-E4B1AEB1E05B} = {CD06AC1A-5DAA-4161-8D57-92D27C4FD911} {1F0ED7C6-3679-4288-9CEA-7B30437D3FA6} = {CD06AC1A-5DAA-4161-8D57-92D27C4FD911} @@ -218,8 +251,13 @@ Global {D9C038B7-6A62-4945-A030-4AC7597F53CA} = {EC44EE95-8EC9-4EE5-A8A6-E6BE2F32C843} {E54D1AD4-E935-479D-8A69-FC073E4DB33D} = {1A8A7481-2108-496B-802D-39F9C08D86F3} {45777B9F-9CC1-47D7-BD66-C3C194277902} = {EC44EE95-8EC9-4EE5-A8A6-E6BE2F32C843} + {A1B2C3D4-1111-4A5B-9C8D-1E2F3A4B5C6D} = {EC44EE95-8EC9-4EE5-A8A6-E6BE2F32C843} + {B2C3D4E5-2222-4B6C-AD9E-2F3A4B5C6D7E} = {EC44EE95-8EC9-4EE5-A8A6-E6BE2F32C843} + {C3D4E5F6-3333-4C7D-BE0F-3A4B5C6D7E8F} = {EC44EE95-8EC9-4EE5-A8A6-E6BE2F32C843} {DFA6B905-57A3-4B31-A74B-25BA2243389F} = {1A8A7481-2108-496B-802D-39F9C08D86F3} {96699B60-67B5-4186-9FEC-3963ED811FF0} = {50DEEF87-BC2F-4B45-B97D-B83135F12786} + {8EAF0E4D-B0E3-4A21-B0F6-EA69F0215F5A} = {34272930-CFC7-4E33-9DB9-88E82AE2C046} + {F9C3BC5E-2E45-4272-A4F1-0F63CFE9A2DE} = {8EAF0E4D-B0E3-4A21-B0F6-EA69F0215F5A} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A417E325-71BD-4C29-94F8-F21FB3F5C392} diff --git a/dev/VSIX/WindowsAppSDK.ico b/dev/Templates/VSIX/WindowsAppSDK.ico similarity index 100% rename from dev/VSIX/WindowsAppSDK.ico rename to dev/Templates/VSIX/WindowsAppSDK.ico diff --git a/dev/Templates/VSIX/build-local-VSIX-package/Build-VSIX.ps1 b/dev/Templates/VSIX/build-local-VSIX-package/Build-VSIX.ps1 new file mode 100644 index 0000000000..e3ed329d02 --- /dev/null +++ b/dev/Templates/VSIX/build-local-VSIX-package/Build-VSIX.ps1 @@ -0,0 +1,517 @@ +<# +.SYNOPSIS + Builds the Windows App SDK VSIX extension packages locally. + +.DESCRIPTION + Reproduces the Azure Pipelines "CreateVsix" stage on a local machine. + Builds up to 4 VSIX files: + - WindowsAppSDK.Cs.Extension.Dev17.Standalone.vsix + - WindowsAppSDK.Cs.Extension.Dev17.Component.vsix + - WindowsAppSDK.Cpp.Extension.Dev17.Standalone.vsix + - WindowsAppSDK.Cpp.Extension.Dev17.Component.vsix + +.PARAMETER WindowsAppSDKVersion + The version of the Microsoft.WindowsAppSDK NuGet package to use. + Example: "1.8.260317003" + If not specified, defaults to the version in Directory.Build.props (1.0.0-preview1). + +.PARAMETER Configuration + Build configuration. Default: Release. + +.PARAMETER Deployment + Which deployment type(s) to build. Default: "LocalDev". + "LocalDev" - Per-user (AllUsers=false) VSIX with a distinct extension + Id (...Dev17.LocalDev). The ONLY flavor that is locally + installable on a developer machine - install with + .\Install-LocalDev-VSIX.ps1 (no admin required). + "Standalone" - Per-machine (AllUsers=true) VSIX. BUILD-ONLY locally; + not installable on a machine that already has the WinUI + workload (the workload owns the same extension Id and + blocks side-loading). Build this when you need an + artifact to ship / sign / publish. + "Component" - Per-machine VSIX flagged IsProductComponent. BUILD-ONLY + locally; consumed by the VS Installer build pipeline. + "Both" - Build Standalone + Component (no LocalDev). + +.PARAMETER EnableExperimentalVSIXFeatures + When set, marks the VSIX as experimental (adds .Experimental suffix, sets Preview=true). + +.PARAMETER OutputDir + Where to copy the final .vsix files. Default: .\publish\VSIX (relative to script dir). + +.PARAMETER NupkgSourceDir + Optional path to a directory containing pre-downloaded Microsoft.WindowsAppSDK*.nupkg. + This directory will be added as a NuGet package source. + +.PARAMETER RepoRoot + Path to the WindowsAppSDK repository root. Default: auto-detected relative to this script. + +.PARAMETER SkipRestore + Skip NuGet restore (useful if you've already restored). + +.EXAMPLE + .\Build-VSIX.ps1 + # Build the LocalDev VSIX (default). Then install with .\Install-LocalDev-VSIX.ps1 + +.EXAMPLE + .\Build-VSIX.ps1 -WindowsAppSDKVersion "1.8.260317003" -Deployment Standalone + # Build a Standalone VSIX artifact (build-only; not installable locally) + +.EXAMPLE + .\Build-VSIX.ps1 -NupkgSourceDir "C:\packages" -Deployment Both + # Build the Standalone + Component artifacts (build-only) +#> + +[CmdletBinding()] +param( + [string]$WindowsAppSDKVersion = "", + + [ValidateSet("Debug", "Release")] + [string]$Configuration = "Release", + + [ValidateSet("Standalone", "Component", "LocalDev", "Both")] + [string]$Deployment = "LocalDev", + + [switch]$EnableExperimentalVSIXFeatures, + + [string]$OutputDir = "", + + [string]$NupkgSourceDir = "", + + [string]$RepoRoot = "", + + [string]$OptionalVSIXVersion = "", + + [switch]$SkipRestore +) + +Set-StrictMode -Version 2.0 +$ErrorActionPreference = "Stop" + +#region --- Helper Functions --- + +function Write-Banner { + param([string]$Message) + $line = "=" * 70 + Write-Host "" + Write-Host $line -ForegroundColor Cyan + Write-Host " $Message" -ForegroundColor Cyan + Write-Host $line -ForegroundColor Cyan + Write-Host "" +} + +function Write-Step { + param([string]$Message) + Write-Host "[*] $Message" -ForegroundColor Green +} + +function Write-Warn { + param([string]$Message) + Write-Host "[!] $Message" -ForegroundColor Yellow +} + +function Write-Err { + param([string]$Message) + Write-Host "[X] $Message" -ForegroundColor Red +} + +function Find-MSBuild { + $vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + if (-not (Test-Path $vswherePath)) { + Write-Err "vswhere.exe not found. Please install Visual Studio 2022 or later." + exit 1 + } + + $msbuildPath = & $vswherePath -latest -requires Microsoft.Component.MSBuild -find "MSBuild\**\Bin\MSBuild.exe" 2>$null | Select-Object -First 1 + if (-not $msbuildPath -or -not (Test-Path $msbuildPath)) { + Write-Err "MSBuild.exe not found. Please install Visual Studio 2022+ with the '.NET desktop development' workload." + exit 1 + } + + return $msbuildPath +} + +function Find-VSInstallPath { + $vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + $installPath = & $vswherePath -latest -property installationPath 2>$null + return $installPath +} + +function Extract-VersionFromNupkg { + param([string]$NupkgDir) + + $nupkgFiles = Get-ChildItem -Path $NupkgDir -Filter "Microsoft.WindowsAppSDK.*.nupkg" | + Where-Object { $_.Name -match "Microsoft\.WindowsAppSDK\.[0-9].*\.nupkg" } + + if ($nupkgFiles.Count -eq 0) { + Write-Err "No Microsoft.WindowsAppSDK*.nupkg files found in '$NupkgDir'." + exit 1 + } + + if ($nupkgFiles.Count -gt 1) { + Write-Err "Multiple Microsoft.WindowsAppSDK nupkg files found in '$NupkgDir'. Please keep only one." + foreach ($f in $nupkgFiles) { Write-Err " - $($f.Name)" } + exit 1 + } + + $nupkg = $nupkgFiles[0] + Write-Step "Found nupkg: $($nupkg.Name)" + + # Extract version from nuspec inside the nupkg + $tempExtract = Join-Path $env:TEMP "vsix-nupkg-extract-$(Get-Random)" + try { + $zipCopy = Join-Path $env:TEMP "$($nupkg.BaseName).zip" + Copy-Item $nupkg.FullName $zipCopy -Force + Expand-Archive -Path $zipCopy -DestinationPath $tempExtract -Force + Remove-Item $zipCopy -Force + + $nuspecFiles = Get-ChildItem -Path $tempExtract -Recurse -Filter "*.nuspec" + foreach ($nuspecFile in $nuspecFiles) { + [xml]$nuspec = Get-Content -Path $nuspecFile.FullName + if ($nuspec.package.metadata.id -eq "Microsoft.WindowsAppSDK") { + $version = $nuspec.package.metadata.version + Write-Step "Extracted version from nuspec: $version" + return $version + } + } + Write-Err "Could not find Microsoft.WindowsAppSDK nuspec in the nupkg." + exit 1 + } + finally { + if (Test-Path $tempExtract) { Remove-Item $tempExtract -Recurse -Force -ErrorAction SilentlyContinue } + } +} + +#endregion + +#region --- Setup --- + +Write-Banner "Windows App SDK VSIX Local Build" + +$scriptDir = $PSScriptRoot +if (-not $scriptDir) { $scriptDir = (Get-Location).Path } + +# Resolve repo root +if ($RepoRoot -eq "") { + $RepoRoot = Join-Path $scriptDir "..\..\..\..\" +} +$RepoRoot = (Resolve-Path $RepoRoot -ErrorAction SilentlyContinue).Path +if (-not $RepoRoot -or -not (Test-Path $RepoRoot)) { + Write-Err "WindowsAppSDK repo root not found. Use -RepoRoot to specify." + exit 1 +} +Write-Step "Repo root: $RepoRoot" + +# Resolve paths +$vsixDir = Join-Path $RepoRoot "dev\Templates\VSIX" +$solutionFile = Join-Path $vsixDir "WindowsAppSDK.Extension.sln" + +if (-not (Test-Path $solutionFile)) { + Write-Err "Solution file not found: $solutionFile" + exit 1 +} +Write-Step "Solution: $solutionFile" + +# Resolve output directory +if ($OutputDir -eq "") { + $OutputDir = Join-Path $scriptDir "publish\VSIX" +} +if (-not (Test-Path $OutputDir)) { + New-Item -ItemType Directory -Path $OutputDir -Force | Out-Null +} +$OutputDir = (Resolve-Path $OutputDir).Path +Write-Step "Output dir: $OutputDir" + +#endregion + +#region --- Prerequisites --- + +Write-Banner "Checking Prerequisites" + +# 1. Find MSBuild +$msbuild = Find-MSBuild +Write-Step "MSBuild: $msbuild" + +# 2. Check VS installation +$vsPath = Find-VSInstallPath +if ($vsPath) { + Write-Step "Visual Studio: $vsPath" +} else { + Write-Warn "Could not detect VS installation path." +} + +# 3. Check VSSDK targets +$vssdkTargets = Join-Path $vsPath "MSBuild\Microsoft\VisualStudio\v17.0\VSSDK\Microsoft.VsSDK.targets" +if (-not (Test-Path $vssdkTargets)) { + # Try generic version path + $vssdkSearch = Get-ChildItem -Path (Join-Path $vsPath "MSBuild") -Recurse -Filter "Microsoft.VsSDK.targets" -ErrorAction SilentlyContinue | Select-Object -First 1 + if ($vssdkSearch) { + Write-Step "VSSDK targets: $($vssdkSearch.FullName)" + } else { + Write-Warn "Microsoft.VsSDK.targets not found. Install the 'Visual Studio extension development' workload." + Write-Warn "The build may still succeed if VSSDK is restored via NuGet (Microsoft.VSSDK.BuildTools)." + } +} else { + Write-Step "VSSDK targets: $vssdkTargets" +} + +# 4. Check .NET SDK +$dotnetPath = Get-Command dotnet -ErrorAction SilentlyContinue +if ($dotnetPath) { + $sdkVersions = & dotnet --list-sdks 2>$null + $hasNet8 = $sdkVersions | Where-Object { $_ -match "^8\." } + if ($hasNet8) { + Write-Step ".NET 8 SDK: found" + } else { + Write-Warn ".NET 8 SDK not found. The DotnetNewTemplates project requires it." + Write-Warn "Install from https://dotnet.microsoft.com/download/dotnet/8.0" + } +} else { + Write-Warn "dotnet CLI not found. The DotnetNewTemplates project may fail to build." +} + +#endregion + +#region --- Version Resolution --- + +Write-Banner "Resolving Package Version" + +if ($NupkgSourceDir -ne "" -and $WindowsAppSDKVersion -eq "") { + $NupkgSourceDir = (Resolve-Path $NupkgSourceDir).Path + Write-Step "Extracting version from nupkg in: $NupkgSourceDir" + $WindowsAppSDKVersion = Extract-VersionFromNupkg -NupkgDir $NupkgSourceDir +} + +if ($WindowsAppSDKVersion -eq "") { + Write-Warn "No -WindowsAppSDKVersion specified and no -NupkgSourceDir provided." + Write-Warn "Falling back to the default in Directory.Build.props (1.0.0-preview1)." + Write-Warn "This version likely does not exist on nuget.org." + Write-Warn "Specify -WindowsAppSDKVersion to use a real version (e.g., '1.8.260317003')." + $WindowsAppSDKVersion = "" +} + +if ($WindowsAppSDKVersion -ne "") { + Write-Step "WindowsAppSDKVersion = $WindowsAppSDKVersion" +} + +if ($OptionalVSIXVersion -eq "") { + $now = Get-Date + $OptionalVSIXVersion = "99.$($now.ToString('yyyy')).$($now.ToString('MMdd')).$($now.ToString('HHmm'))" + Write-Step "OptionalVSIXVersion = $OptionalVSIXVersion (auto-generated from current time)" +} else { + Write-Step "OptionalVSIXVersion = $OptionalVSIXVersion (user-specified)" +} + +#endregion + +#region --- NuGet Config --- + +Write-Banner "Configuring NuGet Sources" + +$nugetConfig = Join-Path $scriptDir "vsix-nuget.config" +if (-not (Test-Path $nugetConfig)) { + Write-Err "vsix-nuget.config not found at: $nugetConfig" + Write-Err "This file should be alongside Build-VSIX.ps1." + exit 1 +} + +# If a local nupkg source is provided, create a temp config with that source added +$effectiveNugetConfig = $nugetConfig +if ($NupkgSourceDir -ne "") { + $tempConfig = Join-Path $env:TEMP "vsix-nuget-temp-$(Get-Random).config" + [xml]$configXml = Get-Content $nugetConfig + $newSource = $configXml.CreateElement("add") + $newSource.SetAttribute("key", "LocalNupkg") + $newSource.SetAttribute("value", $NupkgSourceDir) + $configXml.configuration.packageSources.AppendChild($newSource) | Out-Null + $configXml.Save($tempConfig) + $effectiveNugetConfig = $tempConfig + Write-Step "Added local nupkg source: $NupkgSourceDir" +} + +Write-Step "NuGet config: $effectiveNugetConfig" + +# Use a short build output path to avoid MAX_PATH issues with the VSSDK. +# The VSSDK extracts template ZIPs into deeply nested paths; if the repo +# is in a deep directory the combined path can exceed 260 characters. +$shortBuildOutput = "C:\tmp\vsixbo\" +if (-not (Test-Path $shortBuildOutput)) { + New-Item -ItemType Directory -Path $shortBuildOutput -Force | Out-Null +} +Write-Step "Build output (short path): $shortBuildOutput" + +#endregion + +#region --- Build Functions --- + +function Invoke-MSBuildRestore { + param( + [string]$DeploymentType + ) + + Write-Step "Restoring ($DeploymentType)..." + + $args = @( + $solutionFile + "/t:restore" + "/p:Configuration=$Configuration" + "/p:Platform=Any CPU" + "/p:Deployment=$DeploymentType" + "/p:RestoreConfigFile=$effectiveNugetConfig" + "/p:EnableExperimentalVSIXFeatures=$($EnableExperimentalVSIXFeatures.IsPresent.ToString().ToLower())" + "/p:BuildOutput=$shortBuildOutput" + "/verbosity:minimal" + "/nologo" + ) + + if ($WindowsAppSDKVersion -ne "") { + $args += "/p:WindowsAppSDKVersion=$WindowsAppSDKVersion" + } + + if ($NupkgSourceDir -ne "") { + $args += "/p:RestoreAdditionalProjectSources=$NupkgSourceDir" + } + + if ($OptionalVSIXVersion -ne "") { + $args += "/p:OptionalVSIXVersion=$OptionalVSIXVersion" + } + + Write-Host " > MSBuild $($args -join ' ')" -ForegroundColor DarkGray + & $msbuild @args + if ($LASTEXITCODE -ne 0) { + Write-Err "NuGet restore failed for $DeploymentType deployment." + exit $LASTEXITCODE + } +} + +function Invoke-MSBuildBuild { + param( + [string]$DeploymentType + ) + + Write-Step "Building ($DeploymentType)..." + + $args = @( + $solutionFile + "/p:Configuration=$Configuration" + "/p:Platform=Any CPU" + "/p:Deployment=$DeploymentType" + "/p:EnableExperimentalVSIXFeatures=$($EnableExperimentalVSIXFeatures.IsPresent.ToString().ToLower())" + "/p:BuildOutput=$shortBuildOutput" + "/verbosity:minimal" + "/nologo" + ) + + if ($WindowsAppSDKVersion -ne "") { + $args += "/p:WindowsAppSDKVersion=$WindowsAppSDKVersion" + } + + if ($OptionalVSIXVersion -ne "") { + $args += "/p:OptionalVSIXVersion=$OptionalVSIXVersion" + } + + Write-Host " > MSBuild $($args -join ' ')" -ForegroundColor DarkGray + & $msbuild @args + if ($LASTEXITCODE -ne 0) { + Write-Err "Build failed for $DeploymentType deployment." + exit $LASTEXITCODE + } +} + +function Copy-VsixOutput { + param( + [string]$DeploymentType + ) + + # Search both the short build output and the default BuildOutput location + $searchPaths = @($shortBuildOutput) + $defaultBuildOutput = Join-Path $vsixDir "BuildOutput" + if (Test-Path $defaultBuildOutput) { $searchPaths += $defaultBuildOutput } + + $vsixFiles = @() + foreach ($searchPath in $searchPaths) { + $found = Get-ChildItem -Path $searchPath -Recurse -Filter "WindowsAppSDK.*.$DeploymentType.vsix" -ErrorAction SilentlyContinue + $vsixFiles += $found + } + + if ($vsixFiles.Count -eq 0) { + Write-Warn "No VSIX files found for $DeploymentType deployment." + return + } + + # Deduplicate by filename (same VSIX may appear in multiple locations) + $seen = @{} + foreach ($vsix in $vsixFiles) { + if (-not $seen.ContainsKey($vsix.Name)) { + $seen[$vsix.Name] = $vsix + # Rename to include version: WindowsAppSDK.Cs.Extension.Dev17.Component.vsix + # -> WindowsAppSDK.Cs.Extension.Dev17.Component.99.2026.0416.1640.vsix + $newName = $vsix.BaseName + ".$OptionalVSIXVersion.vsix" + $dest = Join-Path $OutputDir $newName + Copy-Item $vsix.FullName $dest -Force + Write-Step " -> $dest" + } + } +} + +#endregion + +#region --- Execute Build --- + +$deployments = @() +if ($Deployment -eq "Both") { + $deployments = @("Standalone", "Component") +} else { + $deployments = @($Deployment) +} + +foreach ($deploy in $deployments) { + Write-Banner "Building VSIX - $deploy" + + if (-not $SkipRestore) { + Invoke-MSBuildRestore -DeploymentType $deploy + } + Invoke-MSBuildBuild -DeploymentType $deploy + + Write-Step "Copying $deploy VSIX output..." + Copy-VsixOutput -DeploymentType $deploy +} + +#endregion + +#region --- Cleanup --- + +if ($NupkgSourceDir -ne "" -and $effectiveNugetConfig -ne $nugetConfig) { + Remove-Item $effectiveNugetConfig -Force -ErrorAction SilentlyContinue +} + +#endregion + +#region --- Summary --- + +Write-Banner "Build Complete" + +$outputVsix = Get-ChildItem -Path $OutputDir -Filter "*.vsix" -ErrorAction SilentlyContinue +if ($outputVsix.Count -gt 0) { + Write-Step "VSIX files produced:" + foreach ($v in $outputVsix) { + $sizeMB = [math]::Round($v.Length / 1MB, 2) + Write-Host " $($v.Name) ($sizeMB MB)" -ForegroundColor White + } +} else { + Write-Warn "No .vsix files found in $OutputDir." + Write-Warn "Check the build output above for errors." +} + +Write-Host "" +if ($Deployment -eq "LocalDev") { + Write-Step "Next step: install per-user with no admin required:" + Write-Host " .\Install-LocalDev-VSIX.ps1" -ForegroundColor White + Write-Host "" +} else { + Write-Step "Build-only flavor produced. To install on a developer machine," + Write-Step "build the LocalDev flavor instead and run Install-LocalDev-VSIX.ps1." + Write-Host "" +} + +#endregion diff --git a/dev/Templates/VSIX/build-local-VSIX-package/Install-LocalDev-VSIX.ps1 b/dev/Templates/VSIX/build-local-VSIX-package/Install-LocalDev-VSIX.ps1 new file mode 100644 index 0000000000..8dbf2a62f4 --- /dev/null +++ b/dev/Templates/VSIX/build-local-VSIX-package/Install-LocalDev-VSIX.ps1 @@ -0,0 +1,367 @@ +<# +.SYNOPSIS + Installs the locally-built LocalDev (per-user, AllUsers="false") Windows + App SDK Templates VSIX into Visual Studio 2022 and/or 2026. + +.DESCRIPTION + THE FAST DEV LOOP. No admin required. No setup.exe. No workload removal. + + The LocalDev VSIX is identical in content to the Standalone VSIX except + its manifest sets . That makes it a + per-user install under + %LOCALAPPDATA%\Microsoft\VisualStudio\\Extensions\\ + instead of the per-machine + C:\Program Files\Microsoft Visual Studio\\Common7\IDE\Extensions\ + location used by Standalone/Component. + + Why this works on a machine that already has the WinUI workload + =============================================================== + The workload ships the same extension Id (Microsoft.WindowsAppSDK.Cs.Dev17) + per-machine. VS scans BOTH the per-machine and per-user extension hives + at startup. When two installed extensions share the same Id, the higher + Version wins. The locally-built VSIX uses version 99... + and the workload-shipped one is 1.x.x.x, so the LocalDev build always + wins for the current user. The workload copy stays untouched on disk + (no admin needed to install OR uninstall LocalDev). + + Steps performed + --------------- + 1. Discover all VS 17+ instances (vswhere) + 2. Refuse to run if any devenv.exe is open (templates are cached at + startup; replacing the VSIX while VS is running has no effect) + 3. For each (VSIX, instance) pair: VSIXInstaller /quiet /instanceIds: + (no /admin, no elevation) + 4. Optionally invoke devenv /UpdateConfiguration to refresh the + template cache so the new templates appear on the very next launch + (VS would otherwise refresh on first launch anyway) + + What this script DELIBERATELY does NOT do + ----------------------------------------- + * No setup.exe modify (we never touch VS Setup state) + * No removal of workload components + * No deletion of files under Program Files + * No admin elevation required + +.PARAMETER Language + Which language template(s) to install. CSharp | Cpp | Both (default). + +.PARAMETER VsixDir + Directory containing LocalDev .vsix files. Default: .\publish\VSIX + +.PARAMETER VsixPath + Direct path to a single LocalDev .vsix. Overrides -VsixDir and -Language. + +.PARAMETER VsVersionRange + vswhere version range filter. Default '[17.0,)' = VS 2022 and VS 2026. + Use '[17.0,18.0)' for VS 2022 only or '[18.0,19.0)' for VS 2026 only. + +.PARAMETER UninstallFirst + If set, run VSIXInstaller /uninstall: before installing. Useful + when you've already installed a LocalDev build and want a clean reinstall. + NOT required for normal use - VSIXInstaller will replace an existing + per-user copy in place. + +.PARAMETER SkipUpdateConfiguration + Skip the post-install 'devenv /UpdateConfiguration' step. The new + templates will still appear, but only on the next VS launch. + +.EXAMPLE + .\Install-LocalDev-VSIX.ps1 + # Install the latest LocalDev C# + C++ VSIX into every VS 17+ instance. + +.EXAMPLE + .\Install-LocalDev-VSIX.ps1 -Language CSharp -VsVersionRange '[18.0,19.0)' + # Install only the C# VSIX into VS 2026. + +.EXAMPLE + .\Install-LocalDev-VSIX.ps1 -UninstallFirst + # Force a clean reinstall (uninstall then install). +#> + +[CmdletBinding()] +param( + [ValidateSet("CSharp", "Cpp", "Both")] + [string]$Language = "Both", + + [string]$VsixDir = "", + + [string]$VsixPath = "", + + [string]$VsVersionRange = '[17.0,)', + + [switch]$UninstallFirst, + + [switch]$SkipUpdateConfiguration +) + +Set-StrictMode -Version 2.0 +$ErrorActionPreference = 'Stop' + +#region --- Helpers --- + +function Write-Banner { + param([string]$Message) + $line = '=' * 70 + Write-Host '' + Write-Host $line -ForegroundColor Cyan + Write-Host " $Message" -ForegroundColor Cyan + Write-Host $line -ForegroundColor Cyan + Write-Host '' +} + +function Write-Step { param([string]$M) Write-Host "[*] $M" -ForegroundColor Green } +function Write-Warn { param([string]$M) Write-Host "[!] $M" -ForegroundColor Yellow } +function Write-Err { param([string]$M) Write-Host "[X] $M" -ForegroundColor Red } + +function Get-VsixExtId { + param([string]$Name) + # LocalDev VSIX uses Ids with a ".LocalDev" suffix so they don't collide + # with the workload-shipped per-machine copy (see manifest comments). + if ($Name -match '\.Cs\.') { return 'Microsoft.WindowsAppSDK.Cs.Dev17.LocalDev' } + if ($Name -match '\.Cpp\.') { return 'Microsoft.WindowsAppSDK.Cpp.Dev17.LocalDev' } + return $null +} + +function Wait-VsixInstaller { + $waited = 0 + while (Get-Process -Name 'VSIXInstaller' -ErrorAction SilentlyContinue) { + Start-Sleep -Seconds 2 + $waited += 2 + if ($waited % 30 -eq 0) { + Write-Host " Still installing... (${waited}s elapsed)" -ForegroundColor DarkGray + } + } +} + +function Get-LatestVsixInstallerLog { + Get-ChildItem "$env:TEMP\dd_VSIXInstaller_*.log" -ErrorAction SilentlyContinue | + Sort-Object LastWriteTime -Descending | Select-Object -First 1 +} + +#endregion + +#region --- Setup --- + +Write-Banner 'Windows App SDK LocalDev VSIX Installer (per-user, no admin)' + +$scriptDir = $PSScriptRoot +if (-not $scriptDir) { $scriptDir = (Get-Location).Path } + +#endregion + +#region --- Locate VSIX files --- + +Write-Banner 'Locating LocalDev VSIX Files' + +$toInstall = @() + +if ($VsixPath -ne "") { + if (-not (Test-Path $VsixPath)) { + Write-Err "VSIX file not found: $VsixPath" + exit 1 + } + $toInstall += Get-Item $VsixPath +} else { + if ($VsixDir -eq "") { + $VsixDir = Join-Path $scriptDir 'publish\VSIX' + } + if (-not (Test-Path $VsixDir)) { + Write-Err "VSIX directory not found: $VsixDir" + Write-Err "Run '.\Build-VSIX.ps1 -Deployment LocalDev' first." + exit 1 + } + + $csVsix = Get-ChildItem $VsixDir -Filter 'WindowsAppSDK.Cs.Extension.Dev17.LocalDev.*.vsix' -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + $cppVsix = Get-ChildItem $VsixDir -Filter 'WindowsAppSDK.Cpp.Extension.Dev17.LocalDev.*.vsix' -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1 + + if ($Language -in @('CSharp','Both') -and $csVsix) { $toInstall += $csVsix } + if ($Language -in @('Cpp', 'Both') -and $cppVsix) { $toInstall += $cppVsix } +} + +if (-not $toInstall) { + Write-Err "No matching LocalDev VSIX files found." + Write-Err "Expected names: WindowsAppSDK.{Cs,Cpp}.Extension.Dev17.LocalDev..vsix" + Write-Err "Run: .\Build-VSIX.ps1 -Deployment LocalDev" + exit 1 +} + +foreach ($v in $toInstall) { + Write-Step "VSIX: $($v.Name)" +} + +#endregion + +#region --- Refuse to run while VS is open --- + +Write-Banner 'Checking Visual Studio Status' + +$vsProcs = Get-Process -Name 'devenv' -ErrorAction SilentlyContinue +if ($vsProcs) { + Write-Err 'Visual Studio is running. Per-user VSIX installs apply at VS startup;' + Write-Err 'replacing the VSIX while VS is running has no effect on this VS session.' + Write-Err 'Close all devenv.exe processes and re-run this script.' + foreach ($p in $vsProcs) { Write-Err " devenv.exe (PID: $($p.Id))" } + exit 1 +} +Write-Step 'No Visual Studio instances running.' + +#endregion + +#region --- Discover VS instances --- + +Write-Banner "Discovering Visual Studio Installations (range $VsVersionRange)" + +$vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" +if (-not (Test-Path $vswherePath)) { + Write-Err 'vswhere.exe not found. Install Visual Studio 2022 or later.' + exit 1 +} + +$vsInstancesJson = & $vswherePath -products '*' -prerelease -version $VsVersionRange -format json 2>$null +if (-not $vsInstancesJson) { + Write-Err "No Visual Studio installation found matching version range '$VsVersionRange'." + exit 1 +} +$vsInstancesAll = $vsInstancesJson | ConvertFrom-Json + +$vsInstances = @() +foreach ($inst in $vsInstancesAll) { + $vsixExe = Join-Path $inst.installationPath 'Common7\IDE\VSIXInstaller.exe' + if (-not (Test-Path $vsixExe)) { + Write-Warn "Skipping $($inst.displayName) - VSIXInstaller.exe not found." + continue + } + $vsInstances += [PSCustomObject]@{ + InstanceId = $inst.instanceId + DisplayName = $inst.displayName + Version = $inst.installationVersion + Path = $inst.installationPath + VsixInstaller = $vsixExe + Devenv = Join-Path $inst.installationPath 'Common7\IDE\devenv.exe' + } + Write-Step "$($inst.displayName) (v$($inst.installationVersion)) [$($inst.instanceId)]" +} +if (-not $vsInstances) { Write-Err 'No usable VS installations found.'; exit 1 } + +#endregion + +#region --- Optional uninstall (per-user only) --- + +if ($UninstallFirst) { + Write-Banner 'Uninstalling Existing Per-User Copy' + foreach ($vsix in $toInstall) { + $extId = Get-VsixExtId -Name $vsix.Name + if (-not $extId) { continue } + foreach ($inst in $vsInstances) { + Write-Step "[$($inst.DisplayName)] VSIXInstaller /uninstall:$extId ..." + # No /admin flag here - we are intentionally only touching the + # per-user (current user) install. VSIXInstaller will refuse to + # silently uninstall a per-machine extension without /admin, so + # any per-machine workload-shipped copy is left alone (which is + # exactly what we want). + & $inst.VsixInstaller "/uninstall:$extId" '/quiet' "/instanceIds:$($inst.InstanceId)" 2>&1 | Out-Null + Wait-VsixInstaller + $log = Get-LatestVsixInstallerLog + if ($log) { + $tail = Get-Content $log.FullName -Tail 20 -ErrorAction SilentlyContinue + if ($tail | Select-String 'Uninstall.*completed|successfully uninstalled') { + Write-Step "[$($inst.DisplayName)] Per-user copy uninstalled (or none was present)." + } else { + Write-Warn "[$($inst.DisplayName)] Uninstall returned no clear success line." + Write-Warn " Log: $($log.FullName)" + } + } + } + } +} + +#endregion + +#region --- Install (per-user, no admin) --- + +Write-Banner 'Installing LocalDev VSIX (per-user)' + +$failed = @() +$succeeded = @() + +foreach ($vsix in $toInstall) { + foreach ($inst in $vsInstances) { + Write-Step "[$($inst.DisplayName)] Installing $($vsix.Name)..." + $args = @('/quiet', "/instanceIds:$($inst.InstanceId)", $vsix.FullName) + Write-Host " > VSIXInstaller $($args -join ' ')" -ForegroundColor DarkGray + & $inst.VsixInstaller @args 2>&1 | Out-Null + Wait-VsixInstaller + + $log = Get-LatestVsixInstallerLog + $hasError = $false + if ($log) { + $tail = Get-Content $log.FullName -Tail 80 -ErrorAction SilentlyContinue + $errLines = $tail | Select-String 'Install Error|InvalidOperationException.*(Uninstall|Installation).*failed' + if ($errLines) { + $hasError = $true + $failed += "$($vsix.Name) -> $($inst.DisplayName)" + Write-Err "[$($inst.DisplayName)] VSIXInstaller failed." + Write-Err " Log: $($log.FullName)" + foreach ($e in $errLines) { Write-Err " $($e.Line.Trim())" } + } + } + if (-not $hasError) { + Write-Step "[$($inst.DisplayName)] Installed (per-user)." + $succeeded += [PSCustomObject]@{ Vsix = $vsix.Name; Instance = $inst } + } + } +} + +#endregion + +#region --- Refresh template cache --- + +if (-not $SkipUpdateConfiguration -and $succeeded) { + Write-Banner 'Refreshing Template Cache (devenv /UpdateConfiguration)' + # /UpdateConfiguration forces VS to re-scan extensions and rebuild caches + # (incl. ProjectTemplatesCache, ItemTemplatesCache, ComponentModelCache). + # This makes the new templates show up immediately on next File -> New + # without waiting for the next interactive launch to discover them. + $instancesTouched = $succeeded | ForEach-Object { $_.Instance } | Sort-Object InstanceId -Unique + foreach ($inst in $instancesTouched) { + Write-Step "[$($inst.DisplayName)] devenv /UpdateConfiguration ..." + & $inst.Devenv '/UpdateConfiguration' 2>&1 | Out-Null + Write-Step "[$($inst.DisplayName)] Cache refreshed." + } +} + +#endregion + +#region --- Summary --- + +Write-Banner 'Installation Summary' + +if (-not $failed) { + Write-Step 'All LocalDev VSIX(es) installed successfully.' + Write-Host '' + Write-Step 'Verify in Visual Studio:' + Write-Host ' 1. Launch Visual Studio (any installed VS 17+ instance).' -ForegroundColor White + Write-Host ' 2. File -> New -> Project.' -ForegroundColor White + Write-Host ' 3. Filter Language=C#, Search "WinUI".' -ForegroundColor White + Write-Host ' 4. You should see the 7 project templates:' -ForegroundColor White + Write-Host ' 1) Blank App' -ForegroundColor White + Write-Host ' 2) NavigationView App' -ForegroundColor White + Write-Host ' 3) TabView App' -ForegroundColor White + Write-Host ' 4) MVVM App' -ForegroundColor White + Write-Host ' 5) Blank App (Packaged WAP)' -ForegroundColor White + Write-Host ' 6) Class Library' -ForegroundColor White + Write-Host ' 7) Unit Test App' -ForegroundColor White + Write-Host '' + Write-Step 'To uninstall later (no admin needed):' + Write-Host ' .\Install-LocalDev-VSIX.ps1 -UninstallFirst' -ForegroundColor White + Write-Host ' # then Ctrl+C to skip the reinstall, or just let it reinstall' -ForegroundColor DarkGray + Write-Host ' # alternatively:' -ForegroundColor DarkGray + Write-Host ' & "\Common7\IDE\VSIXInstaller.exe" /uninstall:Microsoft.WindowsAppSDK.Cs.Dev17.LocalDev /quiet' -ForegroundColor White + exit 0 +} else { + Write-Err 'Failed installs:' + foreach ($f in $failed) { Write-Err " - $f" } + exit 1 +} + +#endregion diff --git a/dev/Templates/VSIX/build-local-VSIX-package/build-install-localdev-vsix.ps1 b/dev/Templates/VSIX/build-local-VSIX-package/build-install-localdev-vsix.ps1 new file mode 100644 index 0000000000..850ee5b1bb --- /dev/null +++ b/dev/Templates/VSIX/build-local-VSIX-package/build-install-localdev-vsix.ps1 @@ -0,0 +1,120 @@ +<# +.SYNOPSIS + End-to-end LocalDev (per-user, AllUsers="false") build + install for the + Windows App SDK Templates VSIX. + +.DESCRIPTION + The fast dev loop. No admin. No setup.exe. No workload removal. + + 1. Build the LocalDev flavor of the C# (and optionally C++) VSIX + 2. Install it per-user into every VS 17+ instance found by vswhere + 3. Refresh the template cache via 'devenv /UpdateConfiguration' + + See Install-LocalDev-VSIX.ps1 for the full theory of operation. + +.PARAMETER Language + CSharp | Cpp | Both (default). + +.PARAMETER SkipBuild + Reuse the most recently built LocalDev .vsix in publish\VSIX without + rebuilding. + +.PARAMETER VsVersionRange + vswhere version range filter. Default '[17.0,)' (VS 2022 + VS 2026). + Use '[17.0,18.0)' for VS 2022 only, '[18.0,19.0)' for VS 2026 only. + +.PARAMETER UninstallFirst + Run VSIXInstaller /uninstall before installing for a clean reinstall. + +.EXAMPLE + .\build-install-localdev-vsix.ps1 + # Build + install LocalDev C# + C++ to all VS 17+. + +.EXAMPLE + .\build-install-localdev-vsix.ps1 -Language CSharp -VsVersionRange '[18.0,19.0)' + # Build only C# LocalDev and install to VS 2026 only. +#> + +[CmdletBinding()] +param( + [ValidateSet("CSharp", "Cpp", "Both")] + [string]$Language = "Both", + + [switch]$SkipBuild, + + [string]$VsVersionRange = '[17.0,)', + + [switch]$UninstallFirst +) + +Set-StrictMode -Version 2.0 +$ErrorActionPreference = 'Stop' + +function Write-Banner { + param([string]$Message) + $line = '=' * 70 + Write-Host '' + Write-Host $line -ForegroundColor Cyan + Write-Host " $Message" -ForegroundColor Cyan + Write-Host $line -ForegroundColor Cyan + Write-Host '' +} +function Write-Step { param([string]$M) Write-Host "[*] $M" -ForegroundColor Green } +function Write-Err { param([string]$M) Write-Host "[X] $M" -ForegroundColor Red } + +$scriptDir = $PSScriptRoot +if (-not $scriptDir) { $scriptDir = (Get-Location).Path } + +$buildScript = Join-Path $scriptDir 'Build-VSIX.ps1' +$installScript = Join-Path $scriptDir 'Install-LocalDev-VSIX.ps1' +$publishDir = Join-Path $scriptDir 'publish\VSIX' + +Write-Banner 'LocalDev: Build + Install (per-user, no admin)' +Write-Step "Script directory : $scriptDir" +Write-Step "Language : $Language" +Write-Step "VS range filter : $VsVersionRange" +Write-Step "SkipBuild : $($SkipBuild.IsPresent)" + +# --- Build --- +if ($SkipBuild) { + Write-Banner 'Build (SKIPPED via -SkipBuild)' +} else { + Write-Banner 'Build LocalDev VSIX' + if (-not (Test-Path $buildScript)) { + Write-Err "Build-VSIX.ps1 not found at: $buildScript" + exit 1 + } + Push-Location $scriptDir + try { + & $buildScript -Deployment LocalDev + if ($LASTEXITCODE -ne 0) { + Write-Err "Build-VSIX.ps1 exited with code $LASTEXITCODE" + exit $LASTEXITCODE + } + } finally { + Pop-Location + } +} + +# --- Install --- +Write-Banner 'Install LocalDev VSIX' +if (-not (Test-Path $installScript)) { + Write-Err "Install-LocalDev-VSIX.ps1 not found at: $installScript" + exit 1 +} + +$installArgs = @{ + Language = $Language + VsVersionRange = $VsVersionRange +} +if ($UninstallFirst) { $installArgs['UninstallFirst'] = $true } + +Push-Location $scriptDir +try { + & $installScript @installArgs + $exit = $LASTEXITCODE +} finally { + Pop-Location +} + +exit $exit diff --git a/dev/Templates/VSIX/build-local-VSIX-package/build-local-VSIX-package.md b/dev/Templates/VSIX/build-local-VSIX-package/build-local-VSIX-package.md new file mode 100644 index 0000000000..a8f6b0996b --- /dev/null +++ b/dev/Templates/VSIX/build-local-VSIX-package/build-local-VSIX-package.md @@ -0,0 +1,244 @@ +# Windows App SDK VSIX — Local Build & Test Guide + +The fast inner-loop guide for building and testing the WinUI Templates VSIX on +a developer machine that already has Visual Studio 2022 and / or 2026 with the +WinUI workload installed. + +## TL;DR + +```powershell +# Build + install the LocalDev VSIX into every VS 17+ instance on the machine. +# No admin required. No setup.exe modify. No workload removal. +.\build-install-localdev-vsix.ps1 + +# Then in Visual Studio: File -> New -> Project -> filter C# -> search "WinUI" +``` + +That single command rebuilds your local source, installs to `%LOCALAPPDATA%`, +and refreshes the template cache. Do it after every code change you want to +see in real VS. + +--- + +## Why LocalDev is the only locally installable flavor + +The build can produce three flavors. **Only LocalDev is meant to be installed +on a developer box.** The other two are build-only artifacts. + +| Flavor | `` | Extension Id | Locally installable? | Purpose | +|---|---|---|---|---| +| **LocalDev** ★ | `false` (per-user) | `Microsoft.WindowsAppSDK.Cs.Dev17.LocalDev` | **Yes — no admin** | Fast dev loop. Coexists peacefully with the workload-shipped per-machine copy. | +| Standalone | `true` (per-machine) | `Microsoft.WindowsAppSDK.Cs.Dev17` | **No** | Build-only artifact (e.g. for the VS Marketplace pipeline). On any machine that already has the WinUI workload, VSIXInstaller cannot install it because the same Id is owned by 5+ workload components. | +| Component | `true` (per-machine, `IsProductComponent`) | `Microsoft.WindowsAppSDK.Cs.Dev17` | **No** | Build-only artifact for the VS Installer build pipeline (gets picked up as part of the WinUI workload component). | + +> If you really need to test the per-machine install path, do it inside a clean +> VM that does **not** have the WinUI workload installed. Don't try to +> side-load Standalone or Component on a workload-equipped machine — the +> "Uninstall failed; please uninstall all of the following components" +> failure cascade is documented in [investigation.md](investigation.md). + +--- + +## Prerequisites (one-time) + +| Requirement | Details | +|-------------|---------| +| **Visual Studio 2022 (17.0+)** or **2026** | Required for MSBuild and VSSDK targets | +| **Workloads** | `.NET desktop development` + `Visual Studio extension development` | +| **.NET 8 SDK** | Needed by the `WinAppSdk.CSharp.DotnetNewTemplates` project | +| **Internet access** | To restore NuGet packages from nuget.org | + +Quick checks: + +```powershell +& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -format json +dotnet --list-sdks +``` + +--- + +## Inner loop: build + install + reinstall + +The recommended one-shot orchestrator: + +```powershell +# Build LocalDev for both C# and C++; install into every VS 17+ instance. +.\build-install-localdev-vsix.ps1 + +# Reinstall after a code change (uninstalls old per-user copy first): +.\build-install-localdev-vsix.ps1 -UninstallFirst + +# Skip the build step (reuse the latest .vsix in publish\VSIX): +.\build-install-localdev-vsix.ps1 -SkipBuild + +# Limit to one language: +.\build-install-localdev-vsix.ps1 -Language CSharp + +# Limit to one VS major version: +.\build-install-localdev-vsix.ps1 -VsVersionRange '[17.0,18.0)' # VS 2022 only +.\build-install-localdev-vsix.ps1 -VsVersionRange '[18.0,19.0)' # VS 2026 only +``` + +Or run the steps separately (same result): + +```powershell +.\Build-VSIX.ps1 # default = -Deployment LocalDev +.\Install-LocalDev-VSIX.ps1 +``` + +### What the install script does +1. Refuses to run while any `devenv.exe` is open (templates are cached at + startup). +2. `vswhere` discovers all VS 17+ instances. +3. `VSIXInstaller /quiet /instanceIds:` per (VSIX, instance) pair. **No + `/admin`, no elevation.** Output goes to + `%LOCALAPPDATA%\Microsoft\VisualStudio\\Extensions\\`. +4. `devenv /UpdateConfiguration` per instance to refresh + `ProjectTemplatesCache`, `ItemTemplatesCache`, `ComponentModelCache`. + +### What it deliberately does NOT do +- No `setup.exe modify` (never touches VS Setup state). +- No removal of workload components. +- No deletion of files under Program Files. +- No admin elevation. + +### Uninstall the LocalDev copy + +```powershell +& "\Common7\IDE\VSIXInstaller.exe" /uninstall:Microsoft.WindowsAppSDK.Cs.Dev17.LocalDev /quiet +& "\Common7\IDE\VSIXInstaller.exe" /uninstall:Microsoft.WindowsAppSDK.Cpp.Dev17.LocalDev /quiet +``` + +The workload-shipped per-machine copy is never touched and is reactivated +automatically once the LocalDev copy is gone. + +### Verifying in Visual Studio + +1. Launch Visual Studio (any installed VS 17+ instance). +2. File → New → Project. Filter Language=C#, search "WinUI". Expect these + seven project templates: + + | # | Template | + |---|---| + | 1 | WinUI Blank App | + | 2 | WinUI Navigation App | + | 3 | WinUI TabView App | + | 4 | WinUI MVVM App | + | 5 | WinUI Blank App (Packaged WAP) | + | 6 | WinUI Class Library | + | 7 | WinUI Unit Test App | + +3. (Optional) Confirm VS picked up your local build, not the workload copy: + Extensions → Manage Extensions → Installed → look for + **"Windows App SDK C# VS Templates (LocalDev)"** — the `(LocalDev)` + suffix is on the VSIX `` and proves the per-user copy is + active. The workload copy ("Windows App SDK C# VS Templates", no suffix) + may also appear; that's fine — the higher-version per-user LocalDev + registration shadows it for File → New → Project. + +--- + +## Build-only flavors (Standalone, Component) + +Use these only when you need an artifact for signing / publishing / pipeline +parity. **They cannot be installed locally on a workload-equipped machine.** + +```powershell +# Build the Standalone artifact only: +.\Build-VSIX.ps1 -Deployment Standalone + +# Build the Component artifact only: +.\Build-VSIX.ps1 -Deployment Component + +# Build both: +.\Build-VSIX.ps1 -Deployment Both + +# Build with a specific Windows App SDK version: +.\Build-VSIX.ps1 -Deployment Standalone -WindowsAppSDKVersion "1.8.260317003" + +# Build using a local .nupkg directory (auto-extracts the WindowsAppSDK version +# from the embedded .nuspec): +.\Build-VSIX.ps1 -Deployment Standalone -NupkgSourceDir "C:\my-packages" + +# Override the auto-generated VSIX version (default is 99...): +.\Build-VSIX.ps1 -Deployment Standalone -OptionalVSIXVersion "99.2026.0428.1640" +``` + +The output `.vsix` files land in `.\publish\VSIX\` named with the version, e.g. +`WindowsAppSDK.Cs.Extension.Dev17.Standalone.99.2026.0428.1640.vsix`. + +--- + +## File reference + +| File | Purpose | +|------|---------| +| `Build-VSIX.ps1` | Builds VSIXes. Default `-Deployment LocalDev`. | +| `Install-LocalDev-VSIX.ps1` | Per-user install of the LocalDev VSIX into VS 17+ instances. No admin. | +| `build-install-localdev-vsix.ps1` | One-shot orchestrator: Build-VSIX (LocalDev) + Install-LocalDev-VSIX. | +| `vsix-nuget.config` | NuGet config the build script passes via `/p:RestoreConfigFile`. | +| `investigation.md` | Historical findings about why per-machine install is broken on workload-equipped machines. Read this before trying to "fix" Standalone install. | + +--- + +## Troubleshooting + +### Visual Studio shows the old templates after rebuild + +You launched VS while it had the old per-user extension cached. Either: + +- close VS, run `.\build-install-localdev-vsix.ps1 -UninstallFirst`, then + relaunch VS, OR +- open Tools → Get Tools and Features (or `devenv /UpdateConfiguration` from a + shell) to force the template cache rebuild. + +### "Visual Studio is running" error from the install script + +Per-user VSIX installs only take effect on the next VS startup, so the script +refuses to run while any `devenv.exe` exists. Close all VS instances and +re-run. + +### NuGet restore fails with "Unable to find version..." + +The repo's root `NuGet.config` uses `` and points at Microsoft +internal feeds only. `Build-VSIX.ps1` works around this by passing +`vsix-nuget.config` via `/p:RestoreConfigFile`. If you're invoking MSBuild +yourself, use the same parameter. + +### `Microsoft.VsSDK.targets was not found` + +Open Visual Studio Installer → Modify → check the **Visual Studio extension +development** workload. + +### `DotnetNewTemplates` fails to build + +The `WinAppSdk.CSharp.DotnetNewTemplates.csproj` targets `net8.0`. Install the +[.NET 8 SDK](https://dotnet.microsoft.com/download/dotnet/8.0). + +### `VSSDK1300: Could not find a part of the path...` + +The VSSDK extracts template ZIPs into deeply nested paths and the .NET +Framework APIs it uses do not honor `LongPathsEnabled`. `Build-VSIX.ps1` +already redirects build output to `C:\tmp\vsixbo\` to keep paths short. If +you're invoking MSBuild yourself, pass `/p:BuildOutput=C:\tmp\vsixbo\`. + +### "Version 1.0.0-preview1 of package Microsoft.WindowsAppSDK not found" + +You ran `Build-VSIX.ps1` without `-WindowsAppSDKVersion` or `-NupkgSourceDir`, +so the build fell back to the placeholder version baked into +`Directory.Build.props`. The VSIX file still builds and installs (the inner +templates carry token placeholders that are rewritten at template-instantiation +time), but `dotnet new`-style restore against the published nupkg won't work. +Pass a real version when you need package-realistic testing: + +```powershell +.\Build-VSIX.ps1 -Deployment LocalDev -WindowsAppSDKVersion "1.8.260317003" +``` + +### Want to install the Standalone or Component VSIX locally + +Don't. They share an extension Id with the workload-shipped copy and +VSIXInstaller refuses to side-load over a workload-managed extension. See +[investigation.md](investigation.md) for the gory details. Use the LocalDev +flavor for local testing, or test inside a clean VM without the WinUI +workload. diff --git a/dev/Templates/VSIX/build-local-VSIX-package/vsix-nuget.config b/dev/Templates/VSIX/build-local-VSIX-package/vsix-nuget.config new file mode 100644 index 0000000000..4b6d8bc20e --- /dev/null +++ b/dev/Templates/VSIX/build-local-VSIX-package/vsix-nuget.config @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + diff --git a/dev/VSIX/extension.manifest.json b/dev/Templates/VSIX/extension.manifest.json similarity index 100% rename from dev/VSIX/extension.manifest.json rename to dev/Templates/VSIX/extension.manifest.json diff --git a/dev/VSIX/global.json b/dev/Templates/VSIX/global.json similarity index 100% rename from dev/VSIX/global.json rename to dev/Templates/VSIX/global.json diff --git a/dev/VSIX/overview-experimental.md b/dev/Templates/VSIX/overview-experimental.md similarity index 100% rename from dev/VSIX/overview-experimental.md rename to dev/Templates/VSIX/overview-experimental.md diff --git a/dev/VSIX/overview-stable.md b/dev/Templates/VSIX/overview-stable.md similarity index 100% rename from dev/VSIX/overview-stable.md rename to dev/Templates/VSIX/overview-stable.md diff --git a/dev/Templates/how-to-create-a-new-csharp-template.md b/dev/Templates/how-to-create-a-new-csharp-template.md new file mode 100644 index 0000000000..144a1190f3 --- /dev/null +++ b/dev/Templates/how-to-create-a-new-csharp-template.md @@ -0,0 +1,324 @@ +# Adding a new WinUI **C#** template + +The C# templates ship through two channels, both driven by the single +declarative manifest [`templates.props`](templates.props): + +| Channel | Output | Consumer csproj | +| -------------- | ------------------------------------- | --------------- | +| **dotnet-new** | NuGet `Microsoft.WindowsAppSDK.WinUI.CSharp.Templates` | [`Dotnet/WinAppSdk.CSharp.DotnetNewTemplates.csproj`](Dotnet/WinAppSdk.CSharp.DotnetNewTemplates.csproj) | +| **VSIX (C#)** | VS extension (New Project / New Item) | [`VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj`](VSIX/Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj) | + +Adding a template means: drop the content under [`Source/`](Source), +add one entry to `templates.props`, and (if it ships in the VSIX) list +the template in [`VSIX/WindowsAppSDK.Extension.sln`](VSIX/WindowsAppSDK.Extension.sln). +Neither consumer csproj needs to change. + +--- + +## TL;DR + +### 1. Drop the template content under `Source/` + +For a project template: + +``` +dev/Templates/Source/ProjectTemplates/Desktop/CSharp// + .csproj + .ico (used by VSIX) + .png (used by VSIX) + .vstemplate (used by VSIX) + App.xaml / MainWindow.xaml / ... +``` + +For an item template, use `Source/ItemTemplates/Neutral/CSharp//` +with the same shape (no `.png`). + +If the template ships in the VSIX, also add the `.csproj` to +[`VSIX/WindowsAppSDK.Extension.sln`](VSIX/WindowsAppSDK.Extension.sln) +so CI builds it. + +### 2. If the template is a packaged WinUI app, add `Package-managed.appxmanifest` + +Place it next to the `.csproj`. The pack task will rename it to +`Package.appxmanifest` in the produced template. See the FAQ for why +the non-reserved name in Source. + +### 3. If the template ships to `dotnet new`, add the dotnet-new metadata folder + +``` +dev/Templates/Dotnet/templates// + .template.config/ + template.json (required) + dotnetcli.host.json (CLI parameter aliases) + ide.host.json (VS / VS Code metadata) + icon.png (shown in dialogs) +``` + +`` must match the `Identity` you choose in step 4 +(e.g. `templates/navigation-app/` ↔ `winui.navview`). + +### 4. Add an entry to `templates.props` + +Pick the item type by where the template should ship: + +| Ships to dotnet-new | Ships to VSIX | Item type | +| :-----------------: | :-----------: | ------------------------------- | +| ✅ | ✅ | `ProjectTemplate` | +| ✅ | ✅ | `ItemTemplate` | +| ❌ | ✅ | `VsixOnlyProjectTemplate` | +| ✅ | ❌ | `DotnetNewOnlyProjectTemplate` | +| ❌ | ✅ | `VsixOnlyItemTemplate` | +| ✅ | ❌ | `DotnetNewOnlyItemTemplate` | + +Each entry is one MSBuild item element of the chosen type with this +shape: + +```xml + + WinUI.Desktop.Cs.SomeName + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\SomeName + $(MSBuildThisFileDirectory)Dotnet\templates\some-name + Package-managed.appxmanifest + +``` + +| Metadata | Description | Required? | +| -------- | ----------- | --------- | +| `Identity` (the `Include` attribute) | For dotnet-new templates: the short name (also the `content//` subfolder in the NuGet). For VSIX-only templates: any unique name. | Always | +| `BaseName` | File-name stem of the source `.csproj` / `.ico` / `.png` / `.vstemplate`. | Always | +| `SourceDir` | Absolute path to the template's source tree. | Always | +| `DotnetConfigDir` | Absolute path to `Dotnet/templates//`. | When ships to dotnet-new | +| `RenameManifestFrom` | Source-side manifest filename, typically `Package-managed.appxmanifest`. Packed as `Package.appxmanifest`. | Packaged WinUI app templates only | + +### 5. Local build for tests + +1. dotnet new template: + + TL;DR + ```pwsh + # dotnet-new NuGet (inspect produced .nupkg under localpackages\) + dotnet pack dev\Templates\Dotnet\WinAppSdk.CSharp.DotnetNewTemplates.csproj -c Debug + + # dotnet new uninstall Microsoft.WindowsAppSDK.WinUI.CSharp.Templates + + dotnet new install localpackages\Microsoft.WindowsAppSDK.WinUI.CSharp.Templates.*.nupkg + ``` + + read details in [build-local-VSIX-package.md](.\VSIX\build-local-VSIX-package\build-local-VSIX-package.md) + +2. VSIX + + TL;DR + ```pwsh + dev\Templates\VSIX\build-local-VSIX-package\build-install-localdev-vsix.ps1 + ``` + + read details in [build-local-VSIX-package.md](.\VSIX\build-local-VSIX-package\build-local-VSIX-package.md) + +--- + +## How it works under the hood + +### Single source of truth: `templates.props` + +[`templates.props`](templates.props) is a plain MSBuild props file. It +declares six item collections (one per cell of the dotnet-new × VSIX +matrix above) and the per-template metadata for each entry. Default +metadata lives in ``; per-entry metadata only +overrides what differs. + +Both consuming csprojs `` this file, then partition the items by +their delivery channel: + +```text + ProjectTemplate ItemTemplate VsixOnly* DotnetNewOnly* +dotnet-new csproj ✅ ✅ — ✅ +VSIX csproj ✅ ✅ ✅ — +``` + +Adding a template is an entry in `templates.props`. Neither csproj has to +know about it. + +### dotnet-new packaging: `ExpandProjectTemplatePackItems` + +`dotnet new` template packs are just NuGet packages where the template +content sits under `content//`. NuGet's `Pack` target +consumes `` items. Building one +template by hand looks like this: + +```xml + + + + + +``` + +That style is what the original PR shipped. It worked but had problems: +the dotnet csproj needed to know **every** template's exclude list, file +names, and rename rule — and adding one new template meant ~15 lines of +copy-paste with seven find-and-replace edits, none of which the compiler +or NuGet would warn about if you got one wrong. + +We replaced it with an **inline C# MSBuild task** — +`ExpandProjectTemplatePackItems` in +[`WinAppSdk.CSharp.DotnetNewTemplates.csproj`](Dotnet/WinAppSdk.CSharp.DotnetNewTemplates.csproj). +It takes `@(ProjectTemplate)` (or `@(ItemTemplate)`, etc.) and per +template performs the same four-step packing recipe: + +1. Pack everything under `SourceDir`, minus `bin/`, `obj/`, and the + per-template sidecars (`.csproj` / `.ico` / `.png` / `.vstemplate`). +2. If `RenameManifestFrom` is set, re-pack that manifest under the + reserved name `Package.appxmanifest`. +3. Pack everything under `DotnetConfigDir/.template.config/`. +4. Pack a copy of the shared `.gitignore` (project templates only). + +### Why a C# task and not a pure-MSBuild `` with batching + +It would be more idiomatic to write something like: + +```xml + +``` + +…and let MSBuild's task batching fan it out per template. Two MSBuild +rules block that path: + +- **MSB5029** ("wildcard enumerates the whole drive") inspects + `` patterns *before* batching resolves `%(...)` metadata, so + the literal `\**\*.*` after the empty substitution is rejected. +- **MSB4191** forbids custom-metadata references in `` at the + top level (only inside ``), so we can't pre-filter the list + with `Condition="'%(IncludeInVSIX)' != 'false'"` either. + +An MSBuild task is opaque to both checks. The task walks the file +system with `System.IO` at run time, when all metadata has been +resolved. + +### Manifest rename + +Packaged WinUI apps need a file literally named `Package.appxmanifest` +for MSIX tooling to recognize them. But the Source-side template project +*itself* has to build (CI builds the whole `WindowsAppSDK.Extension.sln` +to verify templates don't bit-rot). If the file were named +`Package.appxmanifest` in the Source tree, MSIX tooling would try to +package the *template project* as a real app and fail. + +The convention is therefore: + +- Source tree stores it as `Package-managed.appxmanifest` (a + non-reserved name). +- Packing renames it to `Package.appxmanifest`. + +The `RenameManifestFrom` metadata is what tells the inline task to +perform that rename. + +### VSIX consumption + +The VSIX csproj converts the same manifest into `` +items via MSBuild item transforms: + +```xml + + %(BaseName) + ProjectTemplates + false + TemplateProjectOutputGroup; + +``` + +`IncludeOutputGroupsInVSIX="TemplateProjectOutputGroup"` is the VSSDK +hook each template project uses to publish its `.vstemplate` zip into +the VSIX container. + +We intentionally do not specify the `` GUID hint. MSBuild +resolves ProjectReferences by path; the GUID was historically only a +hint for Solution Explorer. + +### C++/WinRT isolation + +The C++/WinRT VSIX project at +[`VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj`](VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj) +**does not** import [`templates.props`](templates.props) and is not +reached by it indirectly: neither [`Directory.Build.props`](Directory.Build.props) +nor any other auto-discovered props file injects the manifest into the +C++ side. Therefore none of the C# item collections +(`@(ProjectTemplate)`, `@(ItemTemplate)`, `@(VsixOnlyProjectTemplate)`, +`@(VsixOnlyItemTemplate)`, `@(DotnetNewOnlyProjectTemplate)`, +`@(DotnetNewOnlyItemTemplate)`) are visible to the C++ csproj, and +changes to `templates.props` cannot regress the C++ VSIX build. + +If/when C++ templates are migrated to the same declarative manifest in +a follow-up, this isolation note should be updated accordingly. + +--- + +## File / folder reference + +``` +dev/Templates/ +├── templates.props ← the C# manifest (one entry per template) +├── Directory.Build.props ← shared MSBuild props for the Templates folder +├── Dotnet/ ← C# only: packs the dotnet-new NuGet +│ ├── WinAppSdk.CSharp.DotnetNewTemplates.csproj +│ ├── Directory.Build.props +│ └── templates// +│ └── .template.config/ +│ ├── template.json +│ ├── dotnetcli.host.json +│ ├── ide.host.json +│ └── icon.png +├── Source/ ← actual template content (C# and C++) +│ ├── ProjectTemplates/Desktop/CSharp// +│ │ ├── .csproj +│ │ ├── .{ico,png,vstemplate} +│ │ ├── Package-managed.appxmanifest (if packaged) +│ │ └── ...source files... +│ ├── ProjectTemplates/Desktop/CppWinRT// ← out of scope for this doc +│ ├── ItemTemplates/Neutral/CSharp// +│ └── ItemTemplates/Neutral/CppWinRT// ← out of scope for this doc +└── VSIX/ + ├── WindowsAppSDK.Extension.sln + ├── Extension/Cs/Dev17/WindowsAppSDK.Cs.Extension.Dev17.csproj ← C# VSIX (consumes templates.props) + ├── Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj ← C++ VSIX (does NOT import templates.props) + └── Directory.Build.props +``` + +--- + +## FAQ + +**Q. Why is the manifest in `Source/` named `Package-managed.appxmanifest` +instead of `Package.appxmanifest`?** + +The Source-side template project itself has to build cleanly — CI +builds [`VSIX/WindowsAppSDK.Extension.sln`](VSIX/WindowsAppSDK.Extension.sln) +to verify templates don't bit-rot. A file literally named +`Package.appxmanifest` would trigger MSIX tooling and try to package +the template *project itself* as a real app, breaking that build. The +Source tree therefore uses a non-reserved name and the pack task +renames it back to `Package.appxmanifest` in the produced template. + +**Q. I want to add a C++/WinRT template.** + +Currently, this doc and `templates.props` do not cover C++/WinRT. + +For C++ templates, add the template content under + `Source/{Project,Item}Templates/.../CppWinRT//` as usual, + then add a `` to the C++ extension csproj +([`VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj`](VSIX/Extension/Cpp/Dev17/WindowsAppSDK.Cpp.Extension.Dev17.csproj)) +and a corresponding `` to the C++ vsixmanifest. + +There is no dotnet-new pack for C++/WinRT templates yet. diff --git a/dev/Templates/templates.props b/dev/Templates/templates.props new file mode 100644 index 0000000000..640ff68352 --- /dev/null +++ b/dev/Templates/templates.props @@ -0,0 +1,196 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WinUI.Desktop.Cs.SingleProjectPackagedApp + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\SingleProjectPackagedApp + $(MSBuildThisFileDirectory)Dotnet\templates\blank-app + Package-managed.appxmanifest + + + + WinUI.Desktop.Cs.NavigationApp + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\NavigationApp + $(MSBuildThisFileDirectory)Dotnet\templates\navigation-app + Package-managed.appxmanifest + + + + WinUI.Desktop.Cs.ClassLibrary + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\ClassLibrary + $(MSBuildThisFileDirectory)Dotnet\templates\class-library + + + + + WinUI.Desktop.Cs.UnitTestApp + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\UnitTestApp + $(MSBuildThisFileDirectory)Dotnet\templates\unit-test + Package-managed.appxmanifest + + + + WinUI.Desktop.Cs.MvvmApp + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\MvvmApp + $(MSBuildThisFileDirectory)Dotnet\templates\mvvm-app + Package-managed.appxmanifest + + + + WinUI.Desktop.Cs.TabViewApp + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\TabViewApp + $(MSBuildThisFileDirectory)Dotnet\templates\tabview-app + Package-managed.appxmanifest + + + + + + + WinUI.Desktop.Cs.PackagedApp + $(MSBuildThisFileDirectory)Source\ProjectTemplates\Desktop\CSharp\PackagedApp + + + + + + + + + + WinUI.Desktop.Cs.BlankWindow + $(MSBuildThisFileDirectory)Source\ItemTemplates\Desktop\CSharp\BlankWindow + $(MSBuildThisFileDirectory)Dotnet\templates\item-blank-window + + + + WinUI.Neutral.Cs.BlankPage + $(MSBuildThisFileDirectory)Source\ItemTemplates\Neutral\CSharp\BlankPage + $(MSBuildThisFileDirectory)Dotnet\templates\item-blank-page + + + + WinUI.Neutral.Cs.ContentDialog + $(MSBuildThisFileDirectory)Source\ItemTemplates\Neutral\CSharp\ContentDialog + $(MSBuildThisFileDirectory)Dotnet\templates\item-content-dialog + + + + WinUI.Neutral.Cs.ResourceDictionary + $(MSBuildThisFileDirectory)Source\ItemTemplates\Neutral\CSharp\ResourceDictionary + $(MSBuildThisFileDirectory)Dotnet\templates\item-resource-dictionary + + + + WinUI.Neutral.Cs.Resw + $(MSBuildThisFileDirectory)Source\ItemTemplates\Neutral\CSharp\Resw + $(MSBuildThisFileDirectory)Dotnet\templates\item-resw + + + + WinUI.Neutral.Cs.TemplatedControl + $(MSBuildThisFileDirectory)Source\ItemTemplates\Neutral\CSharp\TemplatedControl + $(MSBuildThisFileDirectory)Dotnet\templates\item-templated-control + + + + WinUI.Neutral.Cs.UserControl + $(MSBuildThisFileDirectory)Source\ItemTemplates\Neutral\CSharp\UserControl + $(MSBuildThisFileDirectory)Dotnet\templates\item-user-control + + + + + + + + + + + diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml.cs b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml.cs deleted file mode 100644 index ef074a16f3..0000000000 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/BlankApp/MainWindow.xaml.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices.WindowsRuntime; -using Windows.Foundation; -using Windows.Foundation.Collections; -using Microsoft.UI.Xaml; -using Microsoft.UI.Xaml.Controls; -using Microsoft.UI.Xaml.Controls.Primitives; -using Microsoft.UI.Xaml.Data; -using Microsoft.UI.Xaml.Input; -using Microsoft.UI.Xaml.Media; -using Microsoft.UI.Xaml.Navigation; - -// To learn more about WinUI, the WinUI project structure, -// and more about our project templates, see: http://aka.ms/winui-project-info. - -namespace $safeprojectname$; - -/// -/// An empty window that can be used on its own or navigated to within a Frame. -/// -public sealed partial class MainWindow : Window -{ - public MainWindow() - { - InitializeComponent(); - } -} diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/LockScreenLogo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/LockScreenLogo.scale-200.png deleted file mode 100644 index 7440f0d4bf..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/SplashScreen.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/SplashScreen.scale-200.png deleted file mode 100644 index 32f486a867..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/SplashScreen.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square150x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square150x150Logo.scale-200.png deleted file mode 100644 index 53ee3777ea..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.scale-200.png deleted file mode 100644 index f713bba67f..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index dc9f5bea0c..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/StoreLogo.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/StoreLogo.png deleted file mode 100644 index a4586f26bd..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/StoreLogo.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Wide310x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Wide310x150Logo.scale-200.png deleted file mode 100644 index 8b4a5d0dd5..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/PackagedApp/WapProj/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 7440f0d4bf..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 32f486a867..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index 53ee3777ea..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index f713bba67f..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index dc9f5bea0c..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/StoreLogo.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/StoreLogo.png deleted file mode 100644 index a4586f26bd..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/StoreLogo.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 8b4a5d0dd5..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml b/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml deleted file mode 100644 index 5c061d1cbf..0000000000 --- a/dev/VSIX/ProjectTemplates/Desktop/CSharp/SingleProjectPackagedApp/MainWindow.xaml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/LockScreenLogo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 7440f0d4bf..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/SplashScreen.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 32f486a867..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square150x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index 53ee3777ea..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index f713bba67f..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index dc9f5bea0c..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/StoreLogo.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/StoreLogo.png deleted file mode 100644 index a4586f26bd..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/StoreLogo.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Wide310x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 8b4a5d0dd5..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CSharp/UnitTestApp/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/LockScreenLogo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/LockScreenLogo.scale-200.png deleted file mode 100644 index 7440f0d4bf..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/SplashScreen.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/SplashScreen.scale-200.png deleted file mode 100644 index 32f486a867..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/SplashScreen.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square150x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square150x150Logo.scale-200.png deleted file mode 100644 index 53ee3777ea..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.scale-200.png deleted file mode 100644 index f713bba67f..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index dc9f5bea0c..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/StoreLogo.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/StoreLogo.png deleted file mode 100644 index a4586f26bd..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/StoreLogo.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Wide310x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Wide310x150Logo.scale-200.png deleted file mode 100644 index 8b4a5d0dd5..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/PackagedApp/WapProj/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 7440f0d4bf..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 32f486a867..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index 53ee3777ea..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index f713bba67f..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index dc9f5bea0c..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/StoreLogo.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/StoreLogo.png deleted file mode 100644 index a4586f26bd..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/StoreLogo.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 8b4a5d0dd5..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/SingleProjectPackagedApp/Assets/Wide310x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/LockScreenLogo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/LockScreenLogo.scale-200.png deleted file mode 100644 index 7440f0d4bf..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/LockScreenLogo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/SplashScreen.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/SplashScreen.scale-200.png deleted file mode 100644 index 32f486a867..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/SplashScreen.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square150x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square150x150Logo.scale-200.png deleted file mode 100644 index 53ee3777ea..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square150x150Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.scale-200.png deleted file mode 100644 index f713bba67f..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.scale-200.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png deleted file mode 100644 index dc9f5bea0c..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Square44x44Logo.targetsize-24_altform-unplated.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/StoreLogo.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/StoreLogo.png deleted file mode 100644 index a4586f26bd..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/StoreLogo.png and /dev/null differ diff --git a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Wide310x150Logo.scale-200.png b/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Wide310x150Logo.scale-200.png deleted file mode 100644 index 8b4a5d0dd5..0000000000 Binary files a/dev/VSIX/ProjectTemplates/Desktop/CppWinRT/UnitTestApp/Assets/Wide310x150Logo.scale-200.png and /dev/null differ