From a71cc282d3e7e9c4465fe87374c84b83dc2e5825 Mon Sep 17 00:00:00 2001 From: "Dustin L. Howett" Date: Wed, 14 May 2025 12:15:19 -0700 Subject: [PATCH] cmdpal: use the unified Windows Terminal Versioning scheme (#39320) This pull request adopts the unified versioning scheme used by Windows Terminal, Notepad, and hundreds of other internal and public projects that relied on "XES" or "PackageES". It only does so for the command palette. All command palette assets will be versioned according to the Major and Minor number in `src/modules/cmdpal/custom.props`. This includes DLLs, EXEs, NuGet packages and MSIX bundles. This will ensure that all artifacts that we produce are versioned properly: | thing | version (ex.) | |---------|-----------------| | dll/exe | 0.2.2505.08001 | | nupkg | 0.2.250508001 | | appx | 0.2.3269.0 | For reference, here's the version format: ### EXE, DLL, .NET Assembly 0.2.2505.08001 ^ ^ ^ ^ ^ ^ | | | | | `-Build # on that date | | | | `-Day | | | `-Month | | `-Year | `-Minor `-Major ### NuGet Package 0.2.250508001 ^ ^ ^ ^ ^ ^ | | | | | `-Build # on that date | | | | `-Day | | | `-Month | | `-Year | `-Minor `-Major ### AppX Package 0.2.01281.0 (the leading 0 will be removed) ^ ^ ^ ^^ ^ | | | || `-Contractually always zero (a waste) | | | |`-Build # on that date | | | `-Number of days in [base year] | | `-Number of years since [base year] | `-Minor `-Major [base year] = $(XesBaseYearForStoreVersion) It is expected that the base year is changed every time the version number is changed. --- .github/actions/spell-check/allow/code.txt | 6 ++- .pipelines/v2/release.yml | 19 +++------ .pipelines/v2/templates/job-build-project.yml | 11 +++-- .pipelines/v2/templates/job-build-sdk.yml | 19 ++++++--- .../v2/templates/steps-setup-versioning.yml | 11 +++++ .../variables-nuget-package-version.yml | 17 ++++++++ .pipelines/versionSetting.ps1 | 15 +------ installer/PowerToysSetup/CmdPal.wxs | 14 +++---- src/CmdPalVersion.props | 3 +- src/Common.Dotnet.AotCompatibility.props | 2 +- src/Common.Dotnet.CsWinRT.props | 2 +- .../CmdPalKeyboardService.rc | 40 ------------------- .../CmdPalKeyboardService.vcxproj | 4 -- .../CmdPalKeyboardService.vcxproj.filters | 8 +--- .../cmdpal/CmdPalKeyboardService/resource.h | 13 ------ .../CmdPalModuleInterface.rc | 40 ------------------- .../CmdPalModuleInterface.vcxproj | 9 +---- .../cmdpal/CmdPalModuleInterface/resource.h | 13 ------ .../Microsoft.CmdPal.UI/CmdPal.pre.props | 2 + .../Microsoft.CmdPal.UI.csproj | 12 ++++++ .../Microsoft.Terminal.UI.vcxproj | 11 +---- .../cmdpal/Microsoft.Terminal.UI/resource.h | 13 ------ .../cmdpal/Microsoft.Terminal.UI/version.rc | 40 ------------------- src/modules/cmdpal/custom.props | 11 +++++ ...t.CommandPalette.Extensions.Toolkit.csproj | 2 +- ...icrosoft.CommandPalette.Extensions.vcxproj | 8 ---- .../version.rc | 34 ---------------- .../extensionsdk/nuget/BuildSDKHelper.ps1 | 10 ++++- 28 files changed, 111 insertions(+), 278 deletions(-) create mode 100644 .pipelines/v2/templates/steps-setup-versioning.yml create mode 100644 .pipelines/v2/templates/variables-nuget-package-version.yml delete mode 100644 src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.rc delete mode 100644 src/modules/cmdpal/CmdPalKeyboardService/resource.h delete mode 100644 src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.rc delete mode 100644 src/modules/cmdpal/CmdPalModuleInterface/resource.h delete mode 100644 src/modules/cmdpal/Microsoft.Terminal.UI/resource.h delete mode 100644 src/modules/cmdpal/Microsoft.Terminal.UI/version.rc create mode 100644 src/modules/cmdpal/custom.props delete mode 100644 src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/version.rc diff --git a/.github/actions/spell-check/allow/code.txt b/.github/actions/spell-check/allow/code.txt index ef01f0d7c3..cf4af7fa8b 100644 --- a/.github/actions/spell-check/allow/code.txt +++ b/.github/actions/spell-check/allow/code.txt @@ -274,4 +274,8 @@ testhost Testably #Tools -OIP \ No newline at end of file +OIP +xef +xes +PACKAGEVERSIONNUMBER +APPXMANIFESTVERSION diff --git a/.pipelines/v2/release.yml b/.pipelines/v2/release.yml index bd825355dd..227dd1cf71 100644 --- a/.pipelines/v2/release.yml +++ b/.pipelines/v2/release.yml @@ -20,16 +20,6 @@ parameters: type: string default: '0.0.1' - - name: cmdPalVersionNumber - displayName: "Command Palette Version Number" - type: string - default: '0.0.1' - - - name: cmdPalSdkVersionNumber - displayName: "Command Palette SDK Version Number" - type: string - default: '0.0.1' - - name: buildConfigurations displayName: "Build Configurations" type: object @@ -50,6 +40,9 @@ parameters: name: $(BuildDefinitionName)_$(date:yyMM).$(date:dd)$(rev:rrr) +variables: + - template: templates/variables-nuget-package-version.yml + extends: template: v1/1ES.Official.PipelineTemplate.yml@1ESPipelineTemplates parameters: @@ -88,8 +81,8 @@ extends: buildPlatforms: ${{ parameters.buildPlatforms }} buildConfigurations: ${{ parameters.buildConfigurations }} versionNumber: ${{ parameters.versionNumber }} - cmdPalVersionNumber: ${{ parameters.cmdPalVersionNumber }} publishArtifacts: false # 1ES PT handles publication for us. + official: true codeSign: true runTests: false signingIdentity: @@ -106,7 +99,7 @@ extends: beforeBuildSteps: # Sets versions for all PowerToy created DLLs - pwsh: |- - .pipelines/versionSetting.ps1 -versionNumber '${{ parameters.versionNumber }}' -DevEnvironment '' -cmdPalVersionNumber '${{ parameters.cmdPalVersionNumber }}' + .pipelines/versionSetting.ps1 -versionNumber '${{ parameters.versionNumber }}' -DevEnvironment '' displayName: Prepare versioning # Prepare the localizations and telemetry config before the release build @@ -130,8 +123,8 @@ extends: name: SHINE-INT-L image: SHINE-VS17-Latest os: windows + official: true codeSign: true - sdkVersionNumber: ${{ parameters.cmdPalSdkVersionNumber }} signingIdentity: serviceName: $(SigningServiceName) appId: $(SigningAppId) diff --git a/.pipelines/v2/templates/job-build-project.yml b/.pipelines/v2/templates/job-build-project.yml index 34ac24ae41..d9d8da5773 100644 --- a/.pipelines/v2/templates/job-build-project.yml +++ b/.pipelines/v2/templates/job-build-project.yml @@ -11,6 +11,9 @@ parameters: default: - x64 - arm64 + - name: official + type: boolean + default: false - name: codeSign type: boolean default: false @@ -56,9 +59,6 @@ parameters: - name: versionNumber type: string default: '0.0.1' - - name: cmdPalVersionNumber - type: string - default: '0.0.1' - name: useLatestWinAppSDK type: boolean default: false @@ -215,6 +215,11 @@ jobs: env: VCWhereExtraVersionTarget: '-prerelease' + - ${{ if eq(parameters.official, true) }}: + - template: .\steps-setup-versioning.yml + parameters: + directory: $(build.sourcesdirectory)\src\modules\cmdpal + - pwsh: |- & "$(build.sourcesdirectory)\.pipelines\installWiX.ps1" displayName: Download and install WiX 3.14 development build diff --git a/.pipelines/v2/templates/job-build-sdk.yml b/.pipelines/v2/templates/job-build-sdk.yml index f8aa5dca3e..f8cb9c930a 100644 --- a/.pipelines/v2/templates/job-build-sdk.yml +++ b/.pipelines/v2/templates/job-build-sdk.yml @@ -3,6 +3,9 @@ parameters: type: object default: - Release + - name: official + type: boolean + default: false - name: codeSign type: boolean default: false @@ -12,9 +15,6 @@ parameters: - name: signingIdentity type: object default: {} - - name: sdkVersionNumber - type: string - default: '0.0.1' jobs: - job: "BuildSDK" @@ -36,8 +36,17 @@ jobs: fetchTags: false fetchDepth: 1 + - template: .\steps-ensure-nuget-version.yml + + - task: NuGetAuthenticate@1 + + - ${{ if eq(parameters.official, true) }}: + - template: .\steps-setup-versioning.yml + parameters: + directory: $(build.sourcesdirectory)\src\modules\cmdpal + - pwsh: |- - & "$(build.sourcesdirectory)\src\modules\cmdpal\extensionsdk\nuget\BuildSDKHelper.ps1" -Configuration "Release" -VersionOfSDK ${{ parameters.sdkVersionNumber }} -BuildStep "build" -IsAzurePipelineBuild + & "$(build.sourcesdirectory)\src\modules\cmdpal\extensionsdk\nuget\BuildSDKHelper.ps1" -Configuration "Release" -BuildStep "build" -IsAzurePipelineBuild displayName: Build SDK - ${{ if eq(parameters.codeSign, true) }}: @@ -52,7 +61,7 @@ jobs: ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml' - pwsh: |- - & "$(build.sourcesdirectory)\src\modules\cmdpal\extensionsdk\nuget\BuildSDKHelper.ps1" -Configuration "Release" -VersionOfSDK ${{ parameters.sdkVersionNumber }} -BuildStep "pack" -IsAzurePipelineBuild + & "$(build.sourcesdirectory)\src\modules\cmdpal\extensionsdk\nuget\BuildSDKHelper.ps1" -Configuration "Release" -BuildStep "pack" -IsAzurePipelineBuild displayName: Pack SDK - task: CopyFiles@2 diff --git a/.pipelines/v2/templates/steps-setup-versioning.yml b/.pipelines/v2/templates/steps-setup-versioning.yml new file mode 100644 index 0000000000..6dc0e3ef92 --- /dev/null +++ b/.pipelines/v2/templates/steps-setup-versioning.yml @@ -0,0 +1,11 @@ +parameters: + - name: directory + type: string + default: $(Build.SourcesDirectory) + +steps: + - pwsh: |- + nuget install Microsoft.Windows.Terminal.Versioning -ConfigFile "$(Build.SourcesDirectory)\.pipelines\release-nuget.config" -OutputDirectory _versioning + $VersionRoot = (Get-Item _versioning\Microsoft.Windows.*).FullName + & "$VersionRoot\build\Setup.ps1" -ProjectDirectory "${{ parameters.directory }}" -Verbose + displayName: Set up versioning for ${{ parameters.directory }} via M.W.T.V diff --git a/.pipelines/v2/templates/variables-nuget-package-version.yml b/.pipelines/v2/templates/variables-nuget-package-version.yml new file mode 100644 index 0000000000..460b7ceee0 --- /dev/null +++ b/.pipelines/v2/templates/variables-nuget-package-version.yml @@ -0,0 +1,17 @@ +variables: + # If we are building a branch called "stable*", hide the NuGet suffix. + # If we don't do that, XES will set the suffix to "stable". + # main is special, however. XES ignores main. Since we never produce actual + # shipping builds from main, we want to force it to have a beta label. + # + # In effect: + # BRANCH / BRANDING | Version | + # ------------------|----------------------------| + # stable | 0.2.250512001 | + # main | 0.2.250512001-experimental | + # all others | 0.2.250512001-branch | + ${{ if startsWith(variables['Build.SourceBranchName'], 'stable') }}: + NoNuGetPackBetaVersion: true + ${{ elseif eq(variables['Build.SourceBranchName'], 'main') }}: + NuGetPackBetaVersion: experimental + diff --git a/.pipelines/versionSetting.ps1 b/.pipelines/versionSetting.ps1 index bda3c47cc2..cf2d2595af 100644 --- a/.pipelines/versionSetting.ps1 +++ b/.pipelines/versionSetting.ps1 @@ -5,10 +5,7 @@ Param( [Parameter(Mandatory=$True,Position=2)] [AllowEmptyString()] - [string]$DevEnvironment = "Local", - - [Parameter(Mandatory=$True,Position=3)] - [string]$cmdPalVersionNumber = "0.0.1" + [string]$DevEnvironment = "Local" ) Write-Host $PSScriptRoot @@ -49,7 +46,6 @@ $verProps.Save($verPropWriteFileLocation); $verPropWriteFileLocation = $PSScriptRoot + '/../src/CmdPalVersion.props'; $verPropReadFileLocation = $verPropWriteFileLocation; [XML]$verProps = Get-Content $verPropReadFileLocation -$verProps.Project.PropertyGroup.CmdPalVersion = $cmdPalVersionNumber; $verProps.Project.PropertyGroup.DevEnvironment = $DevEnvironment; Write-Host "xml" $verProps.Project.PropertyGroup.Version $verProps.Save($verPropWriteFileLocation); @@ -90,12 +86,3 @@ $newPlusContextMenuAppManifestReadFileLocation = $newPlusContextMenuAppManifestW $newPlusContextMenuAppManifest.Package.Identity.Version = $versionNumber + '.0' Write-Host "NewPlusContextMenu version" $newPlusContextMenuAppManifest.Package.Identity.Version $newPlusContextMenuAppManifest.Save($newPlusContextMenuAppManifestWriteFileLocation); - -# Set package version in Package.appxmanifest -$cmdPalAppManifestWriteFileLocation = $PSScriptRoot + '/../src/modules/cmdpal/Microsoft.CmdPal.UI/Package.appxmanifest'; -$cmdPalAppManifestReadFileLocation = $cmdPalAppManifestWriteFileLocation; - -[XML]$cmdPalAppManifest = Get-Content $cmdPalAppManifestReadFileLocation -$cmdPalAppManifest.Package.Identity.Version = $cmdPalVersionNumber + '.0' -Write-Host "CmdPal Package version: " $cmdPalAppManifest.Package.Identity.Version -$cmdPalAppManifest.Save($cmdPalAppManifestWriteFileLocation); diff --git a/installer/PowerToysSetup/CmdPal.wxs b/installer/PowerToysSetup/CmdPal.wxs index c74e27d6c1..c3c5280cc5 100644 --- a/installer/PowerToysSetup/CmdPal.wxs +++ b/installer/PowerToysSetup/CmdPal.wxs @@ -19,36 +19,36 @@ - + - + - + - + - + - + - + diff --git a/src/CmdPalVersion.props b/src/CmdPalVersion.props index e9e0e98130..2be9bc69d4 100644 --- a/src/CmdPalVersion.props +++ b/src/CmdPalVersion.props @@ -1,7 +1,8 @@ - 0.0.1 + $(XES_APPXMANIFESTVERSION) + 0.0.1.0 Local diff --git a/src/Common.Dotnet.AotCompatibility.props b/src/Common.Dotnet.AotCompatibility.props index 71c490fd6c..46a39e9c65 100644 --- a/src/Common.Dotnet.AotCompatibility.props +++ b/src/Common.Dotnet.AotCompatibility.props @@ -7,6 +7,6 @@ 2 - IL2081 + IL2081;$(WarningsNotAsErrors) diff --git a/src/Common.Dotnet.CsWinRT.props b/src/Common.Dotnet.CsWinRT.props index cde2ce69ce..d37c39685a 100644 --- a/src/Common.Dotnet.CsWinRT.props +++ b/src/Common.Dotnet.CsWinRT.props @@ -16,7 +16,7 @@ 4 True - CA1720;CA1859;CA2263;CA2022;MVVMTK0045;MVVMTK0049 + CA1824;CA1416;CA1720;CA1859;CA2263;CA2022;MVVMTK0045;MVVMTK0049 diff --git a/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.rc b/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.rc deleted file mode 100644 index 5fa3c8b90d..0000000000 --- a/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.rc +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "resource.h" -#include "../../../common/version/version.h" - -#define APSTUDIO_READONLY_SYMBOLS -#include "winres.h" -#undef APSTUDIO_READONLY_SYMBOLS - -1 VERSIONINFO -FILEVERSION FILE_VERSION -PRODUCTVERSION PRODUCT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#else -FILEFLAGS 0x0L -#endif -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset - END -END diff --git a/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj b/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj index e110d736ae..f891ce96e6 100644 --- a/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj +++ b/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj @@ -108,7 +108,6 @@ KeyboardListener.idl - @@ -130,9 +129,6 @@ - - - diff --git a/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj.filters b/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj.filters index 301ac57f3a..2309326e71 100644 --- a/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj.filters +++ b/src/modules/cmdpal/CmdPalKeyboardService/CmdPalKeyboardService.vcxproj.filters @@ -16,7 +16,6 @@ - @@ -28,9 +27,4 @@ - - - Resources - - - \ No newline at end of file + diff --git a/src/modules/cmdpal/CmdPalKeyboardService/resource.h b/src/modules/cmdpal/CmdPalKeyboardService/resource.h deleted file mode 100644 index f99c3adb95..0000000000 --- a/src/modules/cmdpal/CmdPalKeyboardService/resource.h +++ /dev/null @@ -1,13 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by PowerToys.MeasureToolCore.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "CmdPalKeyboardService" -#define INTERNAL_NAME "CmdPalKeyboardService" -#define ORIGINAL_FILENAME "CmdPalKeyboardService.dll" - -// Non-localizable -////////////////////////////// diff --git a/src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.rc b/src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.rc deleted file mode 100644 index 5fa3c8b90d..0000000000 --- a/src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.rc +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "resource.h" -#include "../../../common/version/version.h" - -#define APSTUDIO_READONLY_SYMBOLS -#include "winres.h" -#undef APSTUDIO_READONLY_SYMBOLS - -1 VERSIONINFO -FILEVERSION FILE_VERSION -PRODUCTVERSION PRODUCT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#else -FILEFLAGS 0x0L -#endif -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset - END -END diff --git a/src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.vcxproj b/src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.vcxproj index 2d70013009..433e7599d5 100644 --- a/src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.vcxproj +++ b/src/modules/cmdpal/CmdPalModuleInterface/CmdPalModuleInterface.vcxproj @@ -44,9 +44,6 @@ {6955446d-23f7-4023-9bb3-8657f904af99} - - {cc6e41ac-8174-4e8a-8d22-85dd7f4851df} - @@ -66,7 +63,6 @@ - @@ -74,9 +70,6 @@ Create - - - @@ -92,4 +85,4 @@ - \ No newline at end of file + diff --git a/src/modules/cmdpal/CmdPalModuleInterface/resource.h b/src/modules/cmdpal/CmdPalModuleInterface/resource.h deleted file mode 100644 index 483f62d2bc..0000000000 --- a/src/modules/cmdpal/CmdPalModuleInterface/resource.h +++ /dev/null @@ -1,13 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by AlwaysOnTopModuleInterface.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys Command Palette Module" -#define INTERNAL_NAME "PowerToys.CmdPalModuleInterface" -#define ORIGINAL_FILENAME "PowerToys.CmdPalModuleInterface.dll" - -// Non-localizable -////////////////////////////// diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/CmdPal.pre.props b/src/modules/cmdpal/Microsoft.CmdPal.UI/CmdPal.pre.props index c732a29374..21c2e7d8d1 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/CmdPal.pre.props +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/CmdPal.pre.props @@ -8,6 +8,8 @@ $(SolutionDir)$(Platform)\$(Configuration)\WinUI3Apps\CmdPal + + $(OutputPath)\AppPackages\ diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj b/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj index 911997da51..b3ec6188cf 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/Microsoft.CmdPal.UI.csproj @@ -38,6 +38,18 @@ DISABLE_XAML_GENERATED_MAIN + + + + + $(ApplicationManifest.Replace("$(MSBuildProjectDirectory)\","")) + + + + diff --git a/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj b/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj index 69e3c64635..a3c282b7f1 100644 --- a/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj +++ b/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj @@ -23,9 +23,6 @@ 10.0.19041.0 - - - Debug @@ -156,7 +153,6 @@ IconPathConverter.idl - ResourceString.idl @@ -205,9 +201,4 @@ - - - {cc6e41ac-8174-4e8a-8d22-85dd7f4851df} - - - \ No newline at end of file + diff --git a/src/modules/cmdpal/Microsoft.Terminal.UI/resource.h b/src/modules/cmdpal/Microsoft.Terminal.UI/resource.h deleted file mode 100644 index 85ae1a0e9b..0000000000 --- a/src/modules/cmdpal/Microsoft.Terminal.UI/resource.h +++ /dev/null @@ -1,13 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by AlwaysOnTopModuleInterface.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys Command Palette Terminal UI" -#define INTERNAL_NAME "Microsoft.Terminal.UI" -#define ORIGINAL_FILENAME "Microsoft.Terminal.UI.dll" - -// Non-localizable -////////////////////////////// diff --git a/src/modules/cmdpal/Microsoft.Terminal.UI/version.rc b/src/modules/cmdpal/Microsoft.Terminal.UI/version.rc deleted file mode 100644 index 0bcdeca2ef..0000000000 --- a/src/modules/cmdpal/Microsoft.Terminal.UI/version.rc +++ /dev/null @@ -1,40 +0,0 @@ -#include -#include "resource.h" -#include "../../../../common/version/version.h" - -#define APSTUDIO_READONLY_SYMBOLS -#include "winres.h" -#undef APSTUDIO_READONLY_SYMBOLS - -1 VERSIONINFO -FILEVERSION FILE_VERSION -PRODUCTVERSION PRODUCT_VERSION -FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG -FILEFLAGS VS_FF_DEBUG -#else -FILEFLAGS 0x0L -#endif -FILEOS VOS_NT_WINDOWS32 -FILETYPE VFT_DLL -FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" // US English (0x0409), Unicode (0x04B0) charset - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 // US English (0x0409), Unicode (1200) charset - END -END diff --git a/src/modules/cmdpal/custom.props b/src/modules/cmdpal/custom.props new file mode 100644 index 0000000000..ddea8b85d2 --- /dev/null +++ b/src/modules/cmdpal/custom.props @@ -0,0 +1,11 @@ + + + + + true + 2025 + 0 + 2 + Microsoft Command Palette + + diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj index 95dc53b444..8f3cdaed91 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/Microsoft.CommandPalette.Extensions.Toolkit.csproj @@ -51,6 +51,6 @@ True - IL2081 + IL2081;$(WarningsNotAsErrors) diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj index 0f87df5625..e7d8875326 100644 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj +++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/Microsoft.CommandPalette.Extensions.vcxproj @@ -180,12 +180,4 @@ - - - - - - {cc6e41ac-8174-4e8a-8d22-85dd7f4851df} - - diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/version.rc b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/version.rc deleted file mode 100644 index 67e50b2cbb..0000000000 --- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/version.rc +++ /dev/null @@ -1,34 +0,0 @@ -#include "winres.h" - -#include "../../../../common/version/version.h" - -VS_VERSION_INFO VERSIONINFO - FILEVERSION FILE_VERSION - PRODUCTVERSION PRODUCT_VERSION - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x0L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", "Microsoft Corporation" - VALUE "FileDescription", "Microsoft.CommandPalette.Extensions.Toolkit" - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "ProductName", "Microsoft.CommandPalette.Extensions.Toolkit" - VALUE "ProductVersion", PRODUCT_VERSION_STRING - VALUE "LegalCopyright", "Copyright (c) Microsoft Corporation" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END diff --git a/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 b/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 index 179c4bfa3f..52e2f17586 100644 --- a/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 +++ b/src/modules/cmdpal/extensionsdk/nuget/BuildSDKHelper.ps1 @@ -1,11 +1,19 @@ Param( [string]$Configuration = "release", - [string]$VersionOfSDK = "0.0.0", + [string]$VersionOfSDK = "", [string]$BuildStep = "all", [switch]$IsAzurePipelineBuild = $false, [switch]$Help = $false ) +If ([String]::IsNullOrEmpty($VersionOfSDK)) { + $VersionOfSDK = $Env:XES_PACKAGEVERSIONNUMBER +} + +If ([String]::IsNullOrEmpty($VersionOfSDK)) { + $VersionOfSDK = "0.0.0" +} + $StartTime = Get-Date if ($Help) {