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/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt
index bdae0338be..15a7584bc9 100644
--- a/.github/actions/spell-check/expect.txt
+++ b/.github/actions/spell-check/expect.txt
@@ -189,6 +189,7 @@ CImage
cla
CLASSDC
CLASSNOTAVAILABLE
+cleanmgr
clickable
clickonce
CLIENTEDGE
@@ -273,6 +274,7 @@ currentculture
CURRENTDIR
CURSORINFO
cursorpos
+CURSORSHOWING
customaction
CUSTOMACTIONTEST
CUSTOMFORMATPLACEHOLDER
@@ -341,7 +343,9 @@ DESELECTOTHERS
DESIGNINFO
DESKTOPABSOLUTEEDITING
DESKTOPABSOLUTEPARSING
+DESKTOPHORZRES
desktopshorcutinstalled
+DESKTOPVERTRES
devblogs
devdocs
devmgmt
@@ -352,6 +356,7 @@ DFX
DIALOGEX
digicert
dimm
+DINORMAL
DISABLEASACTIONKEY
DISABLENOSCROLL
diskmgmt
@@ -395,6 +400,7 @@ DVASPECTINFO
DVD
dvr
DVTARGETDEVICE
+dwflags
dwl
dwm
dwmapi
@@ -482,6 +488,7 @@ FANCYZONESDRAWLAYOUTTEST
FANCYZONESEDITOR
FARPROC
fff
+FFFF
FILEEXPLORER
FILEFLAGS
FILEFLAGSMASK
@@ -600,6 +607,7 @@ helptext
HGFE
hglobal
hhk
+HHmmssfff
hhx
Hiber
Hiberboot
@@ -608,6 +616,7 @@ hicon
HIDEREADONLY
HIDEWINDOW
Hif
+hightlight
HIMAGELIST
himl
hinst
@@ -745,6 +754,7 @@ isocpp
iss
issecret
ISSEPARATOR
+istep
ith
ITHUMBNAIL
IUI
@@ -1272,6 +1282,7 @@ prvpane
psapi
pscid
PSECURITY
+psexec
psfgao
psfi
PSMODULEPATH
@@ -1533,8 +1544,10 @@ SLGP
sln
SMALLICON
smartphone
+smileys
SMTO
SNAPPROCESS
+snk
snwprintf
softline
SOURCECLIENTAREAONLY
@@ -1874,6 +1887,7 @@ WINDOWPOSCHANGING
WINDOWSBUILDNUMBER
windowssearch
windowssettings
+windowsterminal
WINDOWSTYLES
WINDOWSTYLESICON
winerror
@@ -1983,6 +1997,7 @@ Zoneszonabletester
Zoomin
zoomit
ZOOMITX
+Zorder
ZXk
ZXNs
zzz
diff --git a/.pipelines/272MSSharedLibSN2048.snk b/.pipelines/272MSSharedLibSN2048.snk
new file mode 100644
index 0000000000..bd766f84a2
Binary files /dev/null and b/.pipelines/272MSSharedLibSN2048.snk differ
diff --git a/.pipelines/ESRPSigning_sdk.json b/.pipelines/ESRPSigning_sdk.json
index 066acf9e4e..e2e2db7701 100644
--- a/.pipelines/ESRPSigning_sdk.json
+++ b/.pipelines/ESRPSigning_sdk.json
@@ -4,9 +4,66 @@
"SignBatches": [
{
"MatchedPath": [
- "Microsoft.CommandPalette.Extensions.dll",
"Microsoft.CommandPalette.Extensions.Toolkit.dll"
],
+ "SigningInfo": {
+ "Operations": [
+ {
+ "KeyCode": "CP-233904-SN",
+ "OperationSetCode": "StrongNameSign",
+ "ToolName": "sign",
+ "ToolVersion": "1.0",
+ "Parameters": []
+ },
+ {
+ "KeyCode": "CP-233904-SN",
+ "OperationSetCode": "StrongNameVerify",
+ "ToolName": "sign",
+ "ToolVersion": "1.0",
+ "Parameters": []
+ },
+ {
+ "KeyCode": "CP-230012",
+ "OperationSetCode": "SigntoolSign",
+ "Parameters": [
+ {
+ "parameterName": "OpusName",
+ "parameterValue": "Microsoft"
+ },
+ {
+ "parameterName": "OpusInfo",
+ "parameterValue": "http://www.microsoft.com"
+ },
+ {
+ "parameterName": "FileDigest",
+ "parameterValue": "/fd \"SHA256\""
+ },
+ {
+ "parameterName": "PageHash",
+ "parameterValue": "/NPH"
+ },
+ {
+ "parameterName": "TimeStamp",
+ "parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
+ }
+ ],
+ "ToolName": "sign",
+ "ToolVersion": "1.0"
+ },
+ {
+ "KeyCode": "CP-230012",
+ "OperationSetCode": "SigntoolVerify",
+ "Parameters": [],
+ "ToolName": "sign",
+ "ToolVersion": "1.0"
+ }
+ ]
+ }
+ },
+ {
+ "MatchedPath": [
+ "Microsoft.CommandPalette.Extensions.dll"
+ ],
"SigningInfo": {
"Operations": [
{
diff --git a/.pipelines/UpdateVersions.ps1 b/.pipelines/UpdateVersions.ps1
index a1bc5bef9a..0be3e3d30b 100644
--- a/.pipelines/UpdateVersions.ps1
+++ b/.pipelines/UpdateVersions.ps1
@@ -126,16 +126,15 @@ Get-ChildItem -Path $rootPath -Recurse packages.config | ForEach-Object {
}
# Update Directory.Packages.props file
-$propsFile = [System.IO.Path]::Combine($rootPath,"Directory.Packages.props")
-if (Test-Path $propsFile) {
- $file = Read-FileWithEncoding -Path $propsFile
+Get-ChildItem -Path $rootPath -Recurse "Directory.Packages.props" | ForEach-Object {
+ $file = Read-FileWithEncoding -Path $_.FullName
$content = $file.Content
if ($content -match ''
$oldVersionString = ''
$content = $content -replace $oldVersionString, $newVersionString
- Write-FileWithEncoding -Path $propsFile -Content $content -Encoding $file.encoding
- Write-Host "Modified " $propsFile
+ Write-FileWithEncoding -Path $_.FullName -Content $content -Encoding $file.encoding
+ Write-Host "Modified " $_.FullName
}
}
@@ -144,8 +143,8 @@ Get-ChildItem -Path $rootPath -Recurse *.vcxproj | ForEach-Object {
$file = Read-FileWithEncoding -Path $_.FullName
$content = $file.Content
if ($content -match '\\Microsoft.WindowsAppSDK.') {
- $newVersionString = '\Microsoft.WindowsAppSDK.' + $WinAppSDKVersion + '\'
- $oldVersionString = '\\Microsoft.WindowsAppSDK.[-.0-9a-zA-Z]*\\'
+ $newVersionString = '\Microsoft.WindowsAppSDK.' + $WinAppSDKVersion
+ $oldVersionString = '\\Microsoft.WindowsAppSDK.(?=[-.0-9a-zA-Z]*\d)[-.0-9a-zA-Z]*' #positive lookahead for at least a digit
$content = $content -replace $oldVersionString, $newVersionString
Write-FileWithEncoding -Path $_.FullName -Content $content -Encoding $file.encoding
Write-Host "Modified " $_.FullName
diff --git a/.pipelines/loc/loc.yml b/.pipelines/loc/loc.yml
index 8d582c4830..cc4512c92e 100644
--- a/.pipelines/loc/loc.yml
+++ b/.pipelines/loc/loc.yml
@@ -25,7 +25,7 @@ steps:
fetchDepth: 1 # Don't need a deep checkout for loc files!
persistCredentials: true
-- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@3
+- task: MicrosoftTDBuild.tdbuild-task.tdbuild-task.TouchdownBuildTask@5
displayName: 'Touchdown Build - 37400, PRODEXT'
inputs:
teamId: 37400
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 138a7bcad4..05918e348c 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
@@ -59,9 +62,6 @@ parameters:
- name: versionNumber
type: string
default: '0.0.1'
- - name: cmdPalVersionNumber
- type: string
- default: '0.0.1'
- name: useLatestWinAppSDK
type: boolean
default: false
@@ -218,6 +218,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
@@ -397,13 +402,13 @@ jobs:
**\UnitTests-FancyZones.dll
!**\obj\**
- - ${{ if eq(parameters.codeSign, true) }}:
- - pwsh: |-
- $Package = (Get-ChildItem -Recurse -Filter "Microsoft.CmdPal.UI_*.msix" | Select -First 1)
- $PackageFilename = $Package.FullName
- Write-Host "##vso[task.setvariable variable=CmdPalPackagePath]${PackageFilename}"
- displayName: Locate the MSIX
+ - pwsh: |-
+ $Package = (Get-ChildItem -Recurse -Filter "Microsoft.CmdPal.UI_*.msix" | Select -First 1)
+ $PackageFilename = $Package.FullName
+ Write-Host "##vso[task.setvariable variable=CmdPalPackagePath]${PackageFilename}"
+ displayName: Locate the CmdPal MSIX
+ - ${{ if eq(parameters.codeSign, true) }}:
- pwsh: |-
& "$(MakeAppxPath)" unpack /p "$(CmdPalPackagePath)" /d "$(JobOutputDirectory)/CmdPalPackageContents"
displayName: Unpack the MSIX for signing
@@ -423,6 +428,8 @@ jobs:
$PackageFilename = Join-Path $outDir.FullName (Split-Path -Leaf "$(CmdPalPackagePath)")
& "$(MakeAppxPath)" pack /h SHA256 /o /p $PackageFilename /d "$(JobOutputDirectory)/CmdPalPackageContents"
Copy-Item -Force $PackageFilename "$(CmdPalPackagePath)"
+ Remove-Item -Force -Recurse "$(JobOutputDirectory)/CmdPalPackageContents" -ErrorAction:Ignore
+ Remove-Item -Force -Recurse "$(JobOutputDirectory)/_appx" -ErrorAction:Ignore
displayName: Re-pack the new CmdPal package after signing
- template: steps-esrp-signing.yml
@@ -445,6 +452,10 @@ jobs:
batchSignPolicyFile: '$(build.sourcesdirectory)\.pipelines\ESRPSigning_DSC.json'
ciPolicyFile: '$(build.sourcesdirectory)\.pipelines\CIPolicy.xml'
+ - pwsh: |-
+ Copy-Item -Verbose -Force "$(CmdPalPackagePath)" "$(JobOutputDirectory)"
+ displayName: Stage the final CmdPal package
+
- template: steps-build-installer.yml
parameters:
codeSign: ${{ parameters.codeSign }}
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-fetch-and-prepare-localizations.yml b/.pipelines/v2/templates/steps-fetch-and-prepare-localizations.yml
index 30cf2b6f67..44f8c4b6dc 100644
--- a/.pipelines/v2/templates/steps-fetch-and-prepare-localizations.yml
+++ b/.pipelines/v2/templates/steps-fetch-and-prepare-localizations.yml
@@ -4,7 +4,7 @@ parameters:
default: false
steps:
- - task: TouchdownBuildTask@3
+ - task: TouchdownBuildTask@5
displayName: 'Download Localization Files -- PowerToys 37400'
inputs:
teamId: 37400
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/Directory.Packages.props b/Directory.Packages.props
index 083a66e5a9..a4ac308b23 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -55,7 +55,7 @@
-->
-
+
diff --git a/NOTICE.md b/NOTICE.md
index 21d51192c4..9fb3dda87d 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -1472,7 +1472,7 @@ SOFTWARE.
- Microsoft.Windows.CsWin32 0.2.46-beta
- Microsoft.Windows.CsWinRT 2.2.0
- Microsoft.Windows.SDK.BuildTools 10.0.22621.2428
-- Microsoft.WindowsAppSDK 1.7.250401001
+- Microsoft.WindowsAppSDK 1.7.250513003
- Microsoft.WindowsPackageManager.ComInterop 1.10.340
- Microsoft.Xaml.Behaviors.WinUI.Managed 2.0.9
- Microsoft.Xaml.Behaviors.Wpf 1.1.39
diff --git a/PowerToys.sln b/PowerToys.sln
index 51c380d55c..e9e0105eb6 100644
--- a/PowerToys.sln
+++ b/PowerToys.sln
@@ -706,6 +706,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RegistryPreview.FuzzTests",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.CmdPal.Ext.System", "src\modules\cmdpal\ext\Microsoft.CmdPal.Ext.System\Microsoft.CmdPal.Ext.System.csproj", "{64B88F02-CD88-4ED8-9624-989A800230F9}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FancyZones.FuzzTests", "src\modules\fancyzones\FancyZones.FuzzTests\FancyZones.FuzzTests.csproj", "{0217E86E-3476-9946-DE8E-9D200CEBD47A}"
+EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CmdPalKeyboardService", "src\modules\cmdpal\CmdPalKeyboardService\CmdPalKeyboardService.vcxproj", "{5F63C743-F6CE-4DBA-A200-2B3F8A14E8C2}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PowerRename.FuzzingTest", "src\modules\powerrename\PowerRename.FuzzingTest\PowerRename.FuzzingTest.vcxproj", "{2694E2FB-DCD5-4BFF-A418-B6C3C7CE3B8E}"
@@ -2616,6 +2618,14 @@ Global
{2694E2FB-DCD5-4BFF-A418-B6C3C7CE3B8E}.Release|ARM64.ActiveCfg = Release|ARM64
{2694E2FB-DCD5-4BFF-A418-B6C3C7CE3B8E}.Release|x64.ActiveCfg = Release|x64
{2694E2FB-DCD5-4BFF-A418-B6C3C7CE3B8E}.Release|x64.Build.0 = Release|x64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Debug|ARM64.Build.0 = Debug|ARM64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Debug|x64.ActiveCfg = Debug|x64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Debug|x64.Build.0 = Debug|x64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Release|ARM64.ActiveCfg = Release|ARM64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Release|ARM64.Build.0 = Release|ARM64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Release|x64.ActiveCfg = Release|x64
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -2888,6 +2898,7 @@ Global
{64B88F02-CD88-4ED8-9624-989A800230F9} = {ECB8E0D1-7603-4E5C-AB10-D1E545E6F8E2}
{4E0AE3A4-2EE0-44D7-A2D0-8769977254A1} = {322566EF-20DC-43A6-B9F8-616AF942579A}
{43E779F3-D83C-48B1-BA8D-1912DBD76FC9} = {A2221D7E-55E7-4BEA-90D1-4F162D670BBF}
+ {0217E86E-3476-9946-DE8E-9D200CEBD47A} = {D1D6BC88-09AE-4FB4-AD24-5DED46A791DD}
{5F63C743-F6CE-4DBA-A200-2B3F8A14E8C2} = {3846508C-77EB-4034-A702-F8BB263C4F79}
{2694E2FB-DCD5-4BFF-A418-B6C3C7CE3B8E} = {89E20BCE-EB9C-46C8-8B50-E01A82E6FDC3}
EndGlobalSection
diff --git a/README.md b/README.md
index 1a0d80dc00..44c1a800c0 100644
--- a/README.md
+++ b/README.md
@@ -35,19 +35,19 @@ Microsoft PowerToys is a set of utilities for power users to tune and streamline
Go to the [Microsoft PowerToys GitHub releases page][github-release-link] and click on `Assets` at the bottom to show the files available in the release. Please use the appropriate PowerToys installer that matches your machine's architecture and install scope. For most, it is `x64` and per-user.
-[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.91%22
-[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.90%22
-[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.90.0/PowerToysUserSetup-0.90.0-x64.exe
-[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.90.0/PowerToysUserSetup-0.90.0-arm64.exe
-[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.90.0/PowerToysSetup-0.90.0-x64.exe
-[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.90.0/PowerToysSetup-0.90.0-arm64.exe
+[github-next-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.92%22
+[github-current-release-work]: https://github.com/microsoft/PowerToys/issues?q=is%3Aissue+milestone%3A%22PowerToys+0.91%22
+[ptUserX64]: https://github.com/microsoft/PowerToys/releases/download/v0.91.1/PowerToysUserSetup-0.91.1-x64.exe
+[ptUserArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.91.1/PowerToysUserSetup-0.91.1-arm64.exe
+[ptMachineX64]: https://github.com/microsoft/PowerToys/releases/download/v0.91.1/PowerToysSetup-0.91.1-x64.exe
+[ptMachineArm64]: https://github.com/microsoft/PowerToys/releases/download/v0.91.1/PowerToysSetup-0.91.1-arm64.exe
| Description | Filename | sha256 hash |
|----------------|----------|-------------|
-| Per user - x64 | [PowerToysUserSetup-0.90.0-x64.exe][ptUserX64] | 2A6036F5B2D454084E55816C306E1E57EF1D14C916691CBDA42B469797605CE0 |
-| Per user - ARM64 | [PowerToysUserSetup-0.90.0-arm64.exe][ptUserArm64] | AB2E4DC87A9D764BE897C5170E2890E174C89CA912A1916FA3AE1E427536EA4A |
-| Machine wide - x64 | [PowerToysSetup-0.90.0-x64.exe][ptMachineX64] | 12801C44F43D0CC61E90DF1EFDC40E4F3C88341E0199D5B20791042D9B173DCF |
-| Machine wide - ARM64 | [PowerToysSetup-0.90.0-arm64.exe][ptMachineArm64] | 2998007C8FCD7BD2770767C6502AAA2CC75B85EC30DE62986EC7005EB0014EDB |
+| Per user - x64 | [PowerToysUserSetup-0.91.1-x64.exe][ptUserX64] | 42EA4A3E8C79A5456476D19E72B3E2AB9393A89C4DC7442EB7EE5A1E3490D38A |
+| Per user - ARM64 | [PowerToysUserSetup-0.91.1-arm64.exe][ptUserArm64] | F3F433FE04049F9197411D792AADEBF34E3BE7FE16327BD8B73D2A046ED8BAF6 |
+| Machine wide - x64 | [PowerToysSetup-0.91.1-x64.exe][ptMachineX64] | EC4BC3A8625775866B0ED4577CCF83E6EC7B1A0AD267379DDBAF4FE49C7B5BDD |
+| Machine wide - ARM64 | [PowerToysSetup-0.91.1-arm64.exe][ptMachineArm64] | 9CB8911008420D0E446AE3D5CE365E447FA4DF9DCF9337F3A80F933C00FC3689 |
This is our preferred method.
@@ -93,92 +93,164 @@ For guidance on developing for PowerToys, please read the [developer docs](/doc/
Our [prioritized roadmap][roadmap] of features and utilities that the core team is focusing on.
-### 0.90 - March 2025 Update
+### 0.91 - May 2025 Update
In this release, we focused on new features, stability, and automation.
**✨Highlights**
-
+ - We focused on greatly improving Command Palette's performance and fixing a large amount of bugs. Some new features we've added are:
+ - Added the ability for Command Palette to search any file using a fallback command.
+ - Added the ability to make the Command Palette global hotkey a low-level keyboard hook.
+ - Added open URL fallback command for the WebSearch extension, enabling users to directly open URLs in the browser from Command Palette.
+ - You can now define custom formats in the Date and Time plugins of PT Run and Command Palette. Thanks [@htcfreek](https://github.com/htcfreek)!
-- New module: Command Palette ("CmdPal") - Created as the evolution of PowerToys Run with extensibility at the forefront, Command Palette is a quick launcher with a richer display and additional capabilities without sacrificing performance, allowing you to start anything with the shortcut **Win+Alt+Space**! Thanks [@zadjii-msft](https://github.com/zadjii-msft), [@niels9001](https://github.com/niels9001), [@michael-hawker](https://github.com/michael-hawker), [@joadoumie](https://github.com/joadoumie), [@plante-msft](https://github.com/plante-msft), [@ethanfangg](https://github.com/ethanfangg) and [@krschau](https://github.com/krschau)!
- - Enhanced the Color Picker by switching from WPF UI to .NET WPF, resulting in improved themes and visual consistency across different modes. Thanks [@mantaionut](https://github.com/mantaionut)! Thanks [@Jay-o-Way](https://github.com/Jay-o-Way) and [@niels9001](https://github.com/niels9001) for helping with the review!
- - Added the ability to delete files directly from Peek, enhancing file management efficiency. Thanks [@daverayment](https://github.com/daverayment) and thanks [@htcfreek](https://github.com/htcfreek) for the review!
- - Added support for variables in template filenames, enabling dynamic elements like date components and environment variables for enhanced customization in New+. Thanks [@cgaarden](https://github.com/cgaarden)!
+### Advanced Paste
+
+ - Fixed an issue where Advanced Paste failed to create the OCR engine for certain English language tags (e.g., en-CA) by initializing the OCR engine with the user profile language. Thanks [@cryolithic](https://github.com/cryolithic)!
### Color Picker
- - Replaced WPF UI with .NET WPF for the Color Picker, enhancing compatibility and improving theme support. Thanks [@mantaionut](https://github.com/mantaionut)! Thanks [@Jay-o-Way](https://github.com/Jay-o-Way) and [@niels9001](https://github.com/niels9001) for helping with the review!
+ - Fixed an issue where a resource leak caused hangs or crashes by properly disposing of the Graphics object. Thanks [@dcog989](https://github.com/dcog989)!
+ - Fixed an issue where Color Picker exited on Backspace keypress by ensuring it only closes when focused and aligning Escape/Backspace behavior. Thanks [@PesBandi](https://github.com/PesBandi)!
+ - Added support for Oklab and Oklch color formats in Color Picker. Thanks [@lemonyte](https://github.com/lemonyte)!
+
+### Command Not Found
+
+ - Updated the WinGet Command Not Found script to only enable the experimental features if they actually exist.
### Command Palette
-- Introduced the Windows Command Palette ("CmdPal"), the next iteration of PowerToys Run, designed with extensibility at its core. CmdPal includes features such as searching for installed apps, shell commands, files and WinGet package installation. This module aims to provide a more powerful and flexible launcher experience. Thanks [@zadjii-msft](https://github.com/zadjii-msft), [@niels9001](https://github.com/niels9001), [@michael-hawker](https://github.com/michael-hawker), [@joadoumie](https://github.com/joadoumie), [@plante-msft](https://github.com/plante-msft), and the whole team!
-
-### FancyZones
-
- - Fixed a bug where deleting a layout resulted in incorrect data being written to the JSON file.
- - Fixed a bug where layout hotkeys were displayed incorrectly, ensuring the hotkey list does not include invalid entries.
- - Fixed an issue where the "None" option was missing in the editor layout.
+ - Updated bug template to include Command Palette module.
+ - Fixed an issue where the toast window was not scaled for DPI, causing layout issues under display scaling.
+ - Fixed an issue where Up/Down keyboard navigation didn't move selection when caret was at position 0, and add continuous navigation like PT Run v1. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
+ - Updated the Time and Date extension code to simplify it and improve clarity.
+ - Fixed an issue where capitalization in the command causes failure when trying to go to the mouse pointer, resolved by adjusting the command to lowercase.
+ - Added open URL fallback command for the WebSearch extension, enabling users to directly open URLs in the browser from Command Palette. Thanks [@htcfreek](https://github.com/htcfreek)!
+ - Added setting to enable/disable system tray icon in CmdPal and align terminology with Windows 11. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
+ - Fixed an alias update issue by removing the old alias when a new one is set.
+ - Resolved GitHub casing conflict by migrating Exts and exts into a new ext directory, ensuring consistent structure across platforms and preventing path fragmentation.
+ - Fix an issue where the 'Create New Extension' command generated empty file names.
+ - Added the ability to make the global hotkey a low-level keyboard hook.
+ - Added support for JUMBO thumbnails, enabling access to high-resolution icons.
+ - Fixed crashes when CmdPal auto-hid itself while an MSAL dialog was opened, by preventing CmdPal from hiding if it's disabled.
+ - Added support for immediately selecting search text when a page is loaded.
+ - Fixed a bug where extension settings pages failed to reload on reopen by updating the settings form when extension settings are saved.
+ - Fixed an issue where the Command Palette failed to launch from the runner.
+ - Refactored and ported the PowerToys Run v1 calculator logic into Command Palette, added settings support, and improved fallback behavior.
+ - Re-added support for list item keyboard shortcuts.
+ - Enhanced accessibility in Command Palette by adding proper labels, refining animations, improving localization, and fixed a11y related issues.
+ - Ported custom format support to the Time and Date plugin, reordered and cleaned up settings, improved error messaging, and fixed edge-case crashes for more robust and user-friendly behavior. Thanks [@htcfreek](https://github.com/htcfreek)!
+ - Added fallback item for system command.
+ - Fixed a bug in Windows System Command where the key prompt incorrectly displayed "Empty" for the "Open Recycle Bin" action. Thanks [@jironemo](https://github.com/jironemo)!
+ - Fixed an issue where the 'more commands' list showed commands that shouldn't be visible. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
+ - Fixed an issue where the details view in Command Palette displayed an oversized icon and misaligned text, aligning it with Windows Search behavior.
+ - Fixed a bug where empty screen content and command bar commands were cut off when using long labels, ensuring proper layout and visibility.
+ - Improved CmdPal’s WinGet integration by fixing version display for installed packages, enabling updates with icons, and migrating the preview winget API to a stable version.
+ - Fixed a bug where commands for ContentPage didn't update until after exit, by ensuring context menus are fully initialized when they change.
+ - Added fallback support to the TimeDate extension, enabling direct date/time queries without pre-selecting the command.
+ - Added import of Common.Dotnet.AotCompatibility.props across multiple CmdPal project files to enhance AOT compilation support.
+ - Fixed a crash in CmdPal settings caused by a null HotKey when settings.json is missing or lacks a defined hotkey. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
+ - Added support for filterable, nested context menus in CmdPal, including a search box to maintain focus behavior.
+ - Refactored CmdPal classes to improve JSON serialization and introduced new serialization contexts for better performance and maintainability.
+ - Added support for ahead-of-time (AoT) compilation.
+ - Added retry mechanism for CmdPal launch.
+ - Removed some unused files from CmdPal.Common to simplify codebase and facilitate marking it as AoT-compatible.
+ - Fixed a bug where a race condition in the update of SearchText caused the cursor in the input box to automatically jump to the end of the line, ensuring SearchText is only updated after it has actually been changed.
+ - Added support for searching any file in fallback command.
+ - Cleaned up AoT-related code to prevent duplicate operations during testing.
+ - Reduced CmdPal load time by parallelizing extension startup and adding timeouts to prevent misbehaving extensions from blocking others.
+ - Enhanced UI behavior by dismissing the details pane when the list gets emptied, avoiding inconsistent visual states.
+ - Added support to unset the fallback command in CmdPal when no matching command is found, ensuring cleaner reload behavior.
+ - Fixed a leak in the CmdPal extension template by addressing improper ComServer use.
+ - Prevented CmdPal window from maximizing on title bar double-click to maintain intended window behavior. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
+ - Fixed an issue where the Settings UI launched too small by making window dimensions DPI-aware and enforcing minimum width and height using WinUIEx.
+ - Fixed white flash and one-time animation issues in CmdPal by cloaking the window instead of hiding it.
+ - Fixed a bug where all extension settings were fetched on startup by lazy-loading extension settings, reducing initialization overhead.
+ - Added support for protecting CmdPal from crashes on Adaptive Card parse failure.
+ - Replaced shell:AppsFolder with URI activation in CmdPal to improve reliability.
+ - Added ability to open CmdPal settings from PowerToys Settings.
+ - Added ability for CmdPal to observe and dynamically update extension details by tracking property changes on the selected item.
+ - Bumped the toolkit version used in the CmdPal extension template to 0.2.0.
### Image Resizer
- - Fixed warnings in ImageResizer regarding the use of variables "shellItem" and "itemName" without being initialized.
+ - Fixed an issue where deleting an Image Resizer preset removed the wrong preset.
-### Mouse Without Borders
+### Keyboard Manager
- - Enhanced the logger to properly track the file path for easier debugging.
- - Refactored the "Common" class into distinct individual classes to enhance maintainability, and updated all references and unit tests to reflect these changes. Thanks [@mikeclayton](https://github.com/mikeclayton) for this!
+ - Fixed an issue where a modifier key, when set without specifying left or right, would get stuck due to incorrect key handling, by tracking the pressed keys and sending the correct key accordingly. Thanks [@mantaionut](https://github.com/mantaionut)!
-### New+
+### PowerRename
- - Added support for variables in template filenames, including date/time components, parent folder name, and environment variables. Thanks [@cgaarden](https://github.com/cgaarden)!
-
-### Peek
-
- - Added the ability to delete the file currently being previewed in Peek, including navigation updates and handling for deleted items. Thanks [@daverayment](https://github.com/daverayment) and thanks [@htcfreek](https://github.com/htcfreek) for your help reviewing this!
+ - Enhanced PowerRename's time formatting capabilities by adding 12-hour time format patterns with AM/PM support. Thanks [@bitmap4](https://github.com/bitmap4)!
### PowerToys Run
- - Fixed an issue where duplicated applications were shown by ensuring the shell link helper opens .ink files non-exclusively and correctly retrieves the "FullPath". Thanks [@htcfreek](https://github.com/htcfreek) and [@davidegiacometti](https://github.com/davidegiacometti) for review!
- - Fixed an issue where applying round corners on Windows 11 build 22000 caused crashes.
- - Async the OnRename method to unblock the thread. Thanks [@davidegiacometti](https://github.com/davidegiacometti) for review!
- - Added support for using `sq` instead of `^2` in the Unit Converter. Thanks [@PesBandi](https://github.com/PesBandi)!
+ - Added support for custom formats in the "Time and Date" plugin and improves error messages for invalid input formats. Thanks [@htcfreek](https://github.com/htcfreek)!
+ - Fix two crashes: one for WFT on very early dates and another for calculating the week of the month on very late dates (e.g., 31.12.9999), and reorder UI settings. Thanks [@htcfreek](https://github.com/htcfreek)!
+ - Fix an issue where capitalization in the command causes failure when trying to go to the mouse pointer, resolved by adjusting the command to lowercase.
+ - Added version details to plugin error messages for 'Loading error' and 'Init error'. Thanks [@htcfreek](https://github.com/htcfreek)!
+ - Enhanced result model by adding support for preventing usage-based ordering, giving plugin developers greater control over sorting behavior. Thanks [@CoreyHayward](https://github.com/CoreyHayward) and [@htcfreek](https://github.com/htcfreek)!
+
+### Quick Accent
+
+ - Updated the letter mapping in GetDefaultLetterKeyEPO, replacing "ǔ" with "ŭ" for the VK_U key to accurately reflect Esperanto phonetics. Thanks [@OlegKharchevkin](https://github.com/OlegKharchevkin)!
+ - Fixed an issue where Quick Accent did not work properly when using the on-screen keyboard. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
+
+### Registry Preview
+
+ - Enhanced Registry Preview to support pasting registry keys and values without manually writing the file header, and added a new button for resetting the app. Thanks [@htcfreek](https://github.com/htcfreek)!
### Settings
- - Disabled the spell check feature in the text boxes of plugin settings for PowerToys Run. Thanks [@htcfreek](https://github.com/htcfreek)!
- - Fixed an issue where InfoBars for release notes errors were not displayed properly, and added a retry button. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
+ - Fix an issue where the Settings app randomly showed a blank icon in the taskbar by deferring icon assignment until the window is activated.
+ - Added the ability to maximize the "What's New" window for a more comfortable reading experience.
### Workspaces
- - Fixed an issue where some minimized packaged apps (e.g., Microsoft ToDo, Settings) were not snapshotted.
+ - Fixed bugs where Steam games were not captured or launched correctly by updating window filtering and integrating Steam URL protocol handling.
### Documentation
- - Added the FirefoxBookmark plugin to the list of Third-Party plugins for PowerToys Run. Thanks [@8LWXpg](https://github.com/8LWXpg)!
- - Added the SVGL third-party plugin to PowerToys Run, enabling users to search, browse, and copy SVG logos. Thanks [@SameerJS6](https://github.com/SameerJS6)!
- - Added Monaco usage for the Registry Preview.
+ - Added QuickNotes to the third-party plugins documentation for PowerToys Run. Thanks [@ruslanlap](https://github.com/ruslanlap)!
+ - Added Weather and Pomodoro plugins to the PowerToys Run third-party plugin documentation. Thanks [@ruslanlap](https://github.com/ruslanlap)!
+ - Added the Linear plugin to PowerToys Run's third-party plugin documentation. Thanks [@vednig](https://github.com/vednig)!
+ - Fixed formatting issues in documentation files and updated contributor and team member information. Thanks [@DanielEScherzer](https://github.com/DanielEScherzer) and [@RokyZevon](https://github.com/RokyZevon)!
### Development
- - Updated WinGet configuration file location and extension. Thanks [@mdanish-kh](https://github.com/mdanish-kh)!
- - Removed the Markdown file bypass to ensure CI runs for commits that only update Markdown files.
- - Fixed an issue where the default generated file path exceeded the length limit of 260 characters for EnvironmentVariablesUILib.csproj, causing build failures.
- - Upgraded WindowsAppSDK to 1.6.250205002 and CsWinRT to 2.2.0. Thanks [@htcfreek](https://github.com/htcfreek) for review!
- - Upgraded XamlStyler to 3.2501.8 and dotnet-consolidate to 4.2.0. Thanks [@davidegiacometti](https://github.com/davidegiacometti)!
- - Updated .NET Packages from 9.0.2 to 9.0.3.
- - Optimized the UI Test Automation Framework and added UI test cases for the Hosts File Editor module.
- - Added fuzz testing for RegistryPreview.
- - Added new UI tests for the FancyZones editor, including tests for creating, duplicating, editing, and deleting layouts.
- - Added telemetry code to measure the module editor open time and evaluate the benefits of applying AOT.
+ - Updated GitHub Action to install .NET 9 for MSStore release support.
+ - Updated version placeholder in bug_report.yml to prevent incorrect v0.70.0 versioning in issue reports.
+ - Updated GitHub Action to upgrade actions/setup-dotnet from version 3 to version 4 for MSStore release.
+ - Added securityContext to WinGet configuration files, allowing invocation from user context and prompting a single UAC for elevated resources in a separate process. Thanks [@mdanish-kh](https://github.com/mdanish-kh)!
+ - Changed log file extensions from .txt to .log to support proper file associations and tooling compatibility, and added logs for Workspace. Thanks [@benwa](https://github.com/benwa)!
+ - Upgraded testing framework dependencies and aligned package versions across components.
+ - Upgraded dependencies to fix vulnerabilities.
+ - Enhanced repository security by pinning GitHub Actions and Docker tags to immutable full-length commits and integrating automated dependency vulnerability scanning via Dependency Review Workflow. Thanks [@Nick2bad4u](https://github.com/Nick2bad4u)!
+ - Upgraded Boost dependencies to a newer version.
+ - Upgraded toolkit to the latest version, suppressed AoT-related warnings.
+ - Fixed an issue where missing signing for newly added files caused build failures.
+ - Update release pipeline to prevent publishing private symbols for 100 years.
+ - Introduced fuzzing for PowerRename to improve reliability and added setup guidance for extending fuzzing to other C++ modules.
+ - Added centralized pre-creation of generated folders for all .csproj projects to prevent build failures.
+ - Updated WinAppSDK to the latest 1.7 version.
+ - Upgraded Boost dependencies to the latest version for the PowerRename Fuzzing project.
+ - Updated the ADO area path in tsa.json to resolve TSA pipeline errors caused by a deprecated path.
+ - Initiated AoT support for CmdPal with foundational work in progress.
+
+### Tool/General
+ - Added support for automating bug report creation by generating a pre-filled GitHub issue URL with system and diagnostic information. Thanks [@donlaci](https://github.com/donlaci)!
+ - Added scripts to locally build the installer, ensuring the CmdPal can also be launched in a local environment.
+ - Removed export PFX logic to eliminate hardcoded password usage and resolve PSScriptAnalyzer security warning.
+ - Added PowerShell script and CI integration to enforce consistent use of Common.Dotnet.CsWinRT.props across all C# projects under the src folder.
+
+### What is being planned for version 0.92
-
-### What is being planned for version 0.91
+For [v0.92][github-next-release-work], we'll work on the items below:
-For [v0.91][github-next-release-work], we'll work on the items below:
-
- - New module: File Actions Menu
+ - Continued Command Palette polish
- New UI Automation tests
- Working on installer upgrades
- Upgrading Keyboard Manager's editor UI
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.0Local
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 @@
4True
- CA1720;CA1859;CA2263;CA2022;MVVMTK0045;MVVMTK0049
+ CA1824;CA1416;CA1720;CA1859;CA2263;CA2022;MVVMTK0045;MVVMTK0049
diff --git a/src/common/UITestAutomation/Doc/ui-automation-cover-list.md b/src/common/UITestAutomation/Doc/ui-automation-cover-list.md
index b2b799f330..8ffe0233ce 100644
--- a/src/common/UITestAutomation/Doc/ui-automation-cover-list.md
+++ b/src/common/UITestAutomation/Doc/ui-automation-cover-list.md
@@ -22,10 +22,10 @@
* Brief check if all modules are working
* PER-USER and PER-MACHINE TESTS:
- * Install **previous version** on a clean machine and update with new per-machine version. Ensure that it is installed in Program files and that registry entries are under **HKLM**/Software/Classes/PowerToys. Go trhough different modules and ensure that they are working correctly.
+ * Install **previous version** on a clean machine and update with new per-machine version. Ensure that it is installed in Program files and that registry entries are under **HKLM**/Software/Classes/PowerToys. Go through different modules and ensure that they are working correctly.
* Try installing per-user version over already installed per-machine version and ensure that proper error message is shown.
- * Remove PowerToys and install per-user version. Ensure that it is installed in /Local/PowerToys and that registry entries are under **HKCU**/Software/Classes/PowerToys. Go trhough different modules and ensure that they are working correctly.
- * Create a new user and install per-user version there as well. Go trhough different modules and ensure that they are working correctly. Ensure that changing settings for one user does not change settings of other user.
+ * Remove PowerToys and install per-user version. Ensure that it is installed in /Local/PowerToys and that registry entries are under **HKCU**/Software/Classes/PowerToys. Go through different modules and ensure that they are working correctly.
+ * Create a new user and install per-user version there as well. Go through different modules and ensure that they are working correctly. Ensure that changing settings for one user does not change settings of other user.
## Functional tests
@@ -191,7 +191,7 @@
- TestMethod("FancyZones.Settings.TestShowZonesWhenShiftAndMouseOff")
- [X] 5. `Hold Shift key to activate zones while dragging` on, `Use a non-primary mouse button to toggle zone activation` on. Zones aren't shown immediately, only when shift is pressed or when a non-primary mouse click changes the state.
- TestMethod("FancyZones.Settings.TestShowZonesWhenShiftAndMouseOn")
-- [ ] 6. `Show zones on all monitor whilw dragging a window` - turn on,off, verify behavior.
+- [ ] 6. `Show zones on all monitor while dragging a window` - turn on,off, verify behavior.
- [ ] 7. Create a canvas layout with overlapping zones, check zone activation behavior with all `When multiple zones overlap` options
- [X] 8. `Make dragged window transparent` - turn on, off, verify behavior
- TestMethod("FancyZones.Settings.TestMakeDraggedWindowTransparentOn")
@@ -242,7 +242,7 @@ Enable `Move newly created windows to their last known zone`.
Enable `Move newly created windows to the current active monitor`.
- [ ] 17. Open a window that wasn't snapped anywhere, verify it's opened on the active monitor.
- [ ] 18. Open a window that was snapped on the current virtual desktop and current monitor, verify it's opened in its zone.
-- [ ] 19. Open a window that was snappen on the current virtual desktop and another monitor, verify it's opened on the active monitor.
+- [ ] 19. Open a window that was snapped on the current virtual desktop and another monitor, verify it's opened on the active monitor.
- [ ] 20. Open a window that was snapped on another virtual desktop, verify it's opened on the active monitor.
### Switch between windows in the current zone
@@ -608,7 +608,7 @@ Mouse Jump:
- [x] 39. Press the activation shortcut and verify the screens preview appears.
- TestMethod("MouseUtils.MouseJump.EnableMouseJump")
- TestMethod("MouseUtils.MouseJump.EnableMouseJump2")
- - [x] 40. Change activation shortcut and verify that new shorctut triggers Mouse Jump.
+ - [x] 40. Change activation shortcut and verify that new shortcut triggers Mouse Jump.
- TestMethod("MouseUtils.MouseJump.EnableMouseJump")
- TestMethod("MouseUtils.MouseJump.EnableMouseJump3")
- [x] 41. Click around the screen preview and ensure that mouse cursor jumped to clicked location.
@@ -639,7 +639,7 @@ Mouse Jump:
* Enable Screen Ruler. Then:
- [ ] 1. Press the activation shortcut and verify the toolbar appears.
- [ ] 2. Press the activation shortcut again and verify the toolbar disappears.
- - [ ] 3. Disable Screen Ruler and verify that the activation shortuct no longer activates the utility.
+ - [ ] 3. Disable Screen Ruler and verify that the activation shortcut no longer activates the utility.
- [ ] 4. Enable Screen Ruler and press the activation shortcut and verify the toolbar appears.
- [ ] 5. Select the close button in the toolbar and verify it closes the utility.
* With Screen Ruler enabled and activated:
@@ -649,14 +649,14 @@ Mouse Jump:
- [ ] 9. Use the Vertical Spacing utility to measure something and verify that left-click copies the measurement to the clipboard. Verify that right-click dismisses the utility.
- [ ] 10. While using a Spacing utility, verify that using the mouse scroll wheel will adjust pixel color tolerance while measuring.
- [ ] 11. Open mspaint and draw 1px-thick straight line, also click with a pencil to draw a single pixel. In any Spacing mode, verify that one of line's dimension is 1, and pixel's dimensions are 1x1.
- * In a multi-monitor setup with different dpis on each monitor:
+ * In a multi-monitor setup with different DPIs on each monitor:
- [ ] 12. Verify that the utilities work well on each monitor, with continuous mode on and off.
- [ ] 13. Without any window opened and a solid color as your background, verify the horizontal spacing matches the monitor's pixel width.
- [ ] 14. Move your mouse back and forth around the edge of two monitors really quickly in each mode - verify nothing is broken.
* Test the different settings and verify they are applied:
- [ ] 15. Activation shortcut
- - [ ] 16. Continous mode
+ - [ ] 16. Continuous mode
- [ ] 17. Per color channel edge detection
- [ ] 18. Pixel tolerance for edge detection
- [ ] 19. Draw feet on cross
@@ -682,11 +682,11 @@ Mouse Jump:
- [ ] 2. Press Escape and verify the overlay disappears.
- [ ] 3. Press the activation shortcut and verify the overlay appears.
- [ ] 4. Right-click and select Cancel. Verify the overlay disappears.
- - [ ] 5. Disable Text Extractor and verify that the activation shortuct no longer activates the utility.
+ - [ ] 5. Disable Text Extractor and verify that the activation shortcut no longer activates the utility.
* With Text Extractor enabled and activated:
- [ ] 6. Try to select text and verify it is copied to the clipboard.
- [ ] 7. Try to select a different OCR language by right-clicking and verify the change is applied.
- * In a multi-monitor setup with different dpis on each monitor:
+ * In a multi-monitor setup with different DPIs on each monitor:
- [ ] 8. Verify text is correctly captured on all monitors.
* Test the different settings and verify they are applied:
- [ ] 9. Activation shortcut
@@ -708,8 +708,8 @@ Mouse Jump:
- [ ] 7. Click the "Open hosts file" button and verify it opens in your default editor. (likely Notepad)
* Test the different settings and verify they are applied:
- [x] 8. Launch as Administrator.
- - TestMethod("Hosts.Basic.ErrorMessgeShowupIfNotRunAsAdmin")
- - TestMethod("Hosts.Basic.NoErrorMessgeShowupIfRunAsAdmin")
+ - TestMethod("Hosts.Basic.ErrorMessageShowupIfNotRunAsAdmin")
+ - TestMethod("Hosts.Basic.NoErrorMessageShowupIfRunAsAdmin")
- [x] 9. Show a warning at startup.
- TestMethod("Hosts.Settings.ShowWarningDialogIfRunAsAdmin")
- [ ] 10. Additional lines position.
@@ -751,13 +751,13 @@ Mouse Jump:
* In GPO, disable a module that is a Preview Handler (Markdown Preview is good for this). Restart PowerToys.
- [ ] 14. Verify the module is not enabled. (Markdown files won't appear in the preview pane)
- [ ] 15. Open settings and verify the module is not enabled and you can't enable it.
- * Remember to reset all you Settings to Not Configured after the tests, both in Conputer and User Configurations.
+ * Remember to reset all you Settings to Not Configured after the tests, both in Computer and User Configurations.
## Registry Preview
* Open Registry Editor, add new registry key with 1 string value and 1 binary value in e.g. HKLM/Software/Classes/PowerToysTest. Right click new registry key->export and export it to file.
* Launch Registry Preview by right-clicking exported .reg file->'Preview'. Then:
- [ ] 1. Edit file content. Ensure that visual try is being re-populated while typing. Save the file by pressing Save file button. Confirm that file is properly saved by pressing Edit file... button which will open file in Notepad. Try saving file using Save file as... button.
- - [ ] 2. Edit file externaly (e.g. in Notepad) and save it there. Pres Reload from file button and ensure that file content and visual tree are reloaded and show new content.
+ - [ ] 2. Edit file externally (e.g. in Notepad) and save it there. Pres Reload from file button and ensure that file content and visual tree are reloaded and show new content.
- [ ] 3. Select some registry key with registry values in visual tree and ensure that registry values are shown properly in bottom-right area.
- [ ] 4. Try opening different registry file by pressing Open file button.
- [ ] 5. Delete newly created registry key from first step manually in Registry Editor, then try writing registry changes to registry by pressing Write to Registry button in Registry Preview. *Be careful what you are writing!*
@@ -872,7 +872,7 @@ Mouse Jump:
- [ ] 6. Add new profile with no variables and name it "Test_profile_1" (referenced below by name)
- [ ] 7. Edit "Test_profile_1": Add one new variable to profile e.g. name: "profile_1_variable_1" value: "profile_1_value_1"
- [ ] 8. Add new profile "Test_profile_2": From "Add profile dialog" add two new variables (profile_2_variable_1:profile_2_value_1 and profile_2_variable_2:profile_2_value_2). Set profile to enabled and click Save. Open OS Environment variables window and confirm that all variables from the profile are applied correctly. Also, confirm that "Applied variables" list contains all variables from the profile.
- - [ ] 9. Apply "Test_profile_1" while "Test_profile_2" is still aplpied. Open OS Environment variables window and confirm that all variables from Test_profile_2 are unapplied and that all variables from Test_profile_1 are applied. Also, confirm that state of "Applied variables" list is updated correctly.
+ - [ ] 9. Apply "Test_profile_1" while "Test_profile_2" is still applied. Open OS Environment variables window and confirm that all variables from Test_profile_2 are unapplied and that all variables from Test_profile_1 are applied. Also, confirm that state of "Applied variables" list is updated correctly.
- [ ] 10. Unapply applied profile. Open OS Environment variables window and confirm that all variables from the profile are unapplied correctly. Also, confirm that "Applied variables" list does not contain variables from the profile.
* Overriding existing variable
@@ -894,10 +894,10 @@ Mouse Jump:
## Command Not Found
* Go to Command Not Found module settings
- - [ ] 1. If you have PowerShell 7.4 installed, confirm that Install PowerShell 7.4 button is not visible and PowerShell 7.4 is shown as detected. If you don't have PowerShell 7.4, Install it by clicking the button and confirm that it's properly installed. Check Installation logs text box bellow and confirm there are no errors.
- - [ ] 2. If you have Microsoft.WinGet.Client installed, confirm that Install Microsoft.WinGet.Client button is not visible and Microsoft.WinGet.Client is shown as detected. If you don't have Microsoft.WinGet.Client, Install it by clicking the button and confirm that it's properly installed. Check Installation logs text box bellow and confirm there are no errors.
- - [ ] 3. Install the Command Not Found module. Check Installation logs text box bellow and confirm there are no errors. Check PowerShell 7 $PROFILE file and confirm Import-Module command is added there. Start new PowerShell 7.4 session and execute "powertoys" (or "atom"). Confirm that suggestion is given to install powertoys (or atom) winget package. (If suggestion is not given, try running the same command few more times, it might take some time for the first time to load the module). Check Installation logs text box bellow and confirm there are no errors.
- - [ ] 4. Uninstall the module. Check Installation logs text box bellow and confirm there are no errors. Check PowerShell 7 $PROFILE file and confirm Import-Module command is removed. Start new PowerShell 7.4 session and confirm no errors are shown on start.
+ - [ ] 1. If you have PowerShell 7.4 installed, confirm that Install PowerShell 7.4 button is not visible and PowerShell 7.4 is shown as detected. If you don't have PowerShell 7.4, Install it by clicking the button and confirm that it's properly installed. Check Installation logs text box below and confirm there are no errors.
+ - [ ] 2. If you have Microsoft.WinGet.Client installed, confirm that Install Microsoft.WinGet.Client button is not visible and Microsoft.WinGet.Client is shown as detected. If you don't have Microsoft.WinGet.Client, Install it by clicking the button and confirm that it's properly installed. Check Installation logs text box below and confirm there are no errors.
+ - [ ] 3. Install the Command Not Found module. Check Installation logs text box below and confirm there are no errors. Check PowerShell 7 $PROFILE file and confirm Import-Module command is added there. Start new PowerShell 7.4 session and execute "powertoys" (or "atom"). Confirm that suggestion is given to install powertoys (or atom) winget package. (If suggestion is not given, try running the same command few more times, it might take some time for the first time to load the module). Check Installation logs text box below and confirm there are no errors.
+ - [ ] 4. Uninstall the module. Check Installation logs text box below and confirm there are no errors. Check PowerShell 7 $PROFILE file and confirm Import-Module command is removed. Start new PowerShell 7.4 session and confirm no errors are shown on start.
- [ ] 5. Install module again. Uninstall PowerToys. Check PowerShell 7 $PROFILE file and confirm Import-Module command is removed after installer is done.
## DSC
@@ -917,7 +917,7 @@ Mouse Jump:
NOTES:
When using Advanced Paste, make sure that window focused while starting/using Advanced paste is text editor or has text input field focused (e.g. Word).
* Paste As Plain Text
- - [ ] 1. Copy some rich text (e.g word of the text is different color, another work is bold, underlined, etd.).
+ - [ ] 1. Copy some rich text (e.g word of the text is different color, another work is bold, underlined, etc.).
- [ ] 2. Paste the text using standard Windows Ctrl + V shortcut and ensure that rich text is pasted (with all colors, formatting, etc.)
- [ ] 3. Paste the text using Paste As Plain Text activation shortcut and ensure that plain text without any formatting is pasted.
- [ ] 4. Paste again the text using standard Windows Ctrl + V shortcut and ensure the text is now pasted plain without formatting as well.
@@ -929,22 +929,22 @@ Mouse Jump:
- [ ] 9. Open Settings and set Paste as Markdown directly hotkey
- [ ] 10. Copy some text (e.g. some HTML text - convertible to Markdown)
- [ ] 11. Paste the text using set hotkey and confirm that pasted text is converted to markdown
- - [ ] 12. Copy some text (same as in the previous step or different. If nothing is coppied between steps, previously pasted Markdown text will be picked up from clipboard and converted again to nested Markdown).
+ - [ ] 12. Copy some text (same as in the previous step or different. If nothing is copied between steps, previously pasted Markdown text will be picked up from clipboard and converted again to nested Markdown).
- [ ] 13. Open Advanced Paste window using hotkey, click Paste as markdown button and confirm that pasted text is converted to markdown
- - [ ] 14. Copy some text (same as in the previous step or different. If nothing is coppied between steps, previously pasted Markdown text will be picked up from clipboard and converted again to nested Markdown).
+ - [ ] 14. Copy some text (same as in the previous step or different. If nothing is copied between steps, previously pasted Markdown text will be picked up from clipboard and converted again to nested Markdown).
- [ ] 15. Open Advanced Paste window using hotkey, press Ctrl + 2 and confirm that pasted text is converted to markdown
* Paste As JSON
- [ ] 16. Open Settings and set Paste as JSON directly hotkey
- [ ] 17. Copy some XML or CSV text (or any other text, it will be converted to simple JSON object)
- [ ] 18. Paste the text using set hotkey and confirm that pasted text is converted to JSON
- - [ ] 19. Copy some text (same as in the previous step or different. If nothing is coppied between steps, previously pasted JSON text will be picked up from clipboard and converted again to nested JSON).
+ - [ ] 19. Copy some text (same as in the previous step or different. If nothing is copied between steps, previously pasted JSON text will be picked up from clipboard and converted again to nested JSON).
- [ ] 20. Open Advanced Paste window using hotkey, click Paste as markdown button and confirm that pasted text is converted to markdown
- - [ ] 21. Copy some text (same as in the previous step or different. If nothing is coppied between steps, previously pasted JSON text will be picked up from clipboard and converted again to nested JSON).
+ - [ ] 21. Copy some text (same as in the previous step or different. If nothing is copied between steps, previously pasted JSON text will be picked up from clipboard and converted again to nested JSON).
- [ ] 22. Open Advanced Paste window using hotkey, press Ctrl + 3 and confirm that pasted text is converted to markdown
* Paste as custom format using AI
- [ ] 23. Open Settings, navigate to Enable Paste with AI and set OpenAI key.
- [ ] 24. Copy some text to clipboard. Any text.
- - [ ] 25. Open Advanced Paste window using hotkey, and confirm that Custom intput text box is now enabled. Write "Insert smiley after every word" and press Enter. Observe that result preview shows coppied text with smileys between words. Press Enter to paste the result and observe that it is pasted.
+ - [ ] 25. Open Advanced Paste window using hotkey, and confirm that Custom input text box is now enabled. Write "Insert smiley after every word" and press Enter. Observe that result preview shows copied text with smileys between words. Press Enter to paste the result and observe that it is pasted.
- [ ] 26. Open Advanced Paste window using hotkey. Input some query (any, feel free to play around) and press Enter. When result is shown, click regenerate button, to see if new result is generated. Select one of the results and paste. Observe that correct result is pasted.
- [ ] 27. Create few custom actions. Set up hotkey for custom actions and confirm they work. Enable/disable custom actions and confirm that the change is reflected in Advanced Paste UI - custom action is not listed. Try different ctrl + in-app shortcuts for custom actions. Try moving custom actions up/down and confirm that the change is reflected in Advanced Paste UI.
- [ ] 28. Open Settings and disable Custom format preview. Open Advanced Paste window with hotkey, enter some query and press enter. Observe that result is now pasted right away, without showing the preview first.
@@ -960,7 +960,7 @@ Mouse Jump:
- [ ] 1. Launch the Editor by clicking the button on the settings page.
- [ ] 2. Launch the Editor from quick access.
- [ ] 3. Launch the Editor by the Activation shortcut.
- - [ ] 4. Disable the module and and verify it won't launch by the shortcut.
+ - [ ] 4. Disable the module and verify it won't launch by the shortcut.
* Snapshot tool: try with elevated and non-elevated PT
* Open non-packaged apps, e.g., VisualStudio, VisualStudioCode.
diff --git a/src/common/UITestAutomation/Session.cs b/src/common/UITestAutomation/Session.cs
index 9ba6ac6363..064c085f22 100644
--- a/src/common/UITestAutomation/Session.cs
+++ b/src/common/UITestAutomation/Session.cs
@@ -532,6 +532,7 @@ namespace Microsoft.PowerToys.UITest
Assert.IsNotNull(this.Root, $"Failed to attach to the window '{windowName}'. Root driver is null");
}
+ Task.Delay(3000).Wait();
return this;
}
diff --git a/src/common/UITestAutomation/SessionHelper.cs b/src/common/UITestAutomation/SessionHelper.cs
index 6ff4e0c68d..bfb31decdc 100644
--- a/src/common/UITestAutomation/SessionHelper.cs
+++ b/src/common/UITestAutomation/SessionHelper.cs
@@ -72,9 +72,6 @@ namespace Microsoft.PowerToys.UITest
/// The PowerToys module to start.
public SessionHelper Init()
{
- // Exit setting exe to fix CommandPalette error, remove after fixing the issue
- this.ExitExe(this.locationPath + ModuleConfigData.Instance.GetModulePath(PowerToysModule.PowerToysSettings));
-
this.ExitExe(this.locationPath + this.sessionPath);
this.StartExe(this.locationPath + this.sessionPath);
diff --git a/src/common/UITestAutomation/UITestBase.cs b/src/common/UITestAutomation/UITestBase.cs
index 771aa2b321..17ae42e244 100644
--- a/src/common/UITestAutomation/UITestBase.cs
+++ b/src/common/UITestAutomation/UITestBase.cs
@@ -39,8 +39,6 @@ namespace Microsoft.PowerToys.UITest
private System.Threading.Timer? screenshotTimer;
private string? screenshotDirectory;
- // private System.Threading.Timer? screenshotTimer;
- // private string? screenshotDirectory;
public UITestBase(PowerToysModule scope = PowerToysModule.PowerToysSettings, WindowSize size = WindowSize.UnSpecified)
{
this.IsInPipeline = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("platform"));
@@ -64,6 +62,7 @@ namespace Microsoft.PowerToys.UITest
[TestInitialize]
public void TestInit()
{
+ CloseOtherApplications();
if (IsInPipeline)
{
screenshotDirectory = Path.Combine(this.TestContext.TestResultsDirectory ?? string.Empty, "UITestScreenshots_" + Guid.NewGuid().ToString());
@@ -461,6 +460,25 @@ namespace Microsoft.PowerToys.UITest
return;
}
+ private void CloseOtherApplications()
+ {
+ // Close other applications
+ var processNamesToClose = new List
+ {
+ "PowerToys",
+ "PowerToys.Settings",
+ "PowerToys.FancyZonesEditor",
+ };
+ foreach (var processName in processNamesToClose)
+ {
+ foreach (var process in Process.GetProcessesByName(processName))
+ {
+ process.Kill();
+ process.WaitForExit();
+ }
+ }
+ }
+
public class NativeMethods
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
diff --git a/src/common/UITestAutomation/VisualAssert.cs b/src/common/UITestAutomation/VisualAssert.cs
index 9226981ee1..692090440a 100644
--- a/src/common/UITestAutomation/VisualAssert.cs
+++ b/src/common/UITestAutomation/VisualAssert.cs
@@ -15,7 +15,7 @@ namespace Microsoft.PowerToys.UITest
///
/// Asserts current visual state of the element is equal with base line image.
/// To use this VisualAssert, you need to set Window Theme to Light-Mode to avoid Theme color difference in baseline image.
- /// Such limiation could be removed either Auto-generate baseline image for both Light & Dark mode
+ /// Such limitation could be removed either Auto-generate baseline image for both Light & Dark mode
///
/// TestContext object
/// Element object
@@ -68,7 +68,7 @@ namespace Microsoft.PowerToys.UITest
|| !Path.GetFileNameWithoutExtension(baselineImageResourceName).EndsWith(scenarioSubname))
{
testContext?.AddResultFile(tempTestImagePath);
- Assert.Fail($"Baseline image for scenario {scenarioSubname} can not be found, test image saved in file://{tempTestImagePath.Replace('\\', '/')}");
+ Assert.Fail($"Baseline image for scenario {scenarioSubname} can't be found, test image saved in file://{tempTestImagePath.Replace('\\', '/')}");
}
var tempBaselineImagePath = GetTempFilePath(scenarioSubname, "baseline", Path.GetExtension(baselineImageResourceName));
diff --git a/src/common/UITestAutomation/VisualHelper.cs b/src/common/UITestAutomation/VisualHelper.cs
index 767ce29d97..8700b23017 100644
--- a/src/common/UITestAutomation/VisualHelper.cs
+++ b/src/common/UITestAutomation/VisualHelper.cs
@@ -29,7 +29,7 @@ namespace Microsoft.PowerToys.UITest
#pragma warning restore SA1307
[DllImport("uxtheme.dll", EntryPoint = "#120")]
- private static extern IntPtr GetUserColorPreference(ref IMMERSIVE_COLOR_PREFERENCE pcpPreference, bool fForceReload);
+ private static extern IntPtr GetUserColorPreference(ref IMMERSIVE_COLOR_PREFERENCE colorPreference, bool fForceReload);
///
/// Gets the system accent color.
diff --git a/src/modules/Hosts/Hosts.UITests/HostModuleTests.cs b/src/modules/Hosts/Hosts.UITests/HostModuleTests.cs
index b5864448c3..beae5dc5c7 100644
--- a/src/modules/Hosts/Hosts.UITests/HostModuleTests.cs
+++ b/src/modules/Hosts/Hosts.UITests/HostModuleTests.cs
@@ -125,7 +125,7 @@ namespace Hosts.UITests
///
///
///
- [TestMethod("Hosts.Basic.ErrorMessgeShowupIfNotRunAsAdmin")]
+ [TestMethod("Hosts.Basic.ErrorMessageShowupIfNotRunAsAdmin")]
[TestCategory("Hosts File Editor #8")]
public void TestErrorMessageWithNonAdminPermission()
{
@@ -151,7 +151,7 @@ namespace Hosts.UITests
///
///
///
- [TestMethod("Hosts.Basic.NoErrorMessgeShowupIfRunAsAdmin")]
+ [TestMethod("Hosts.Basic.NoErrorMessageShowupIfRunAsAdmin")]
[TestCategory("Hosts File Editor #8")]
public void TestNoErrorMessageWithNonAdminPermission()
{
diff --git a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj
index f0b12187ad..41a968dbae 100644
--- a/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj
+++ b/src/modules/MeasureTool/MeasureToolCore/PowerToys.MeasureToolCore.vcxproj
@@ -1,6 +1,6 @@
-
+
@@ -141,7 +141,7 @@
-
+
@@ -153,7 +153,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/src/modules/MeasureTool/MeasureToolCore/packages.config b/src/modules/MeasureTool/MeasureToolCore/packages.config
index 996736442d..f6fdf954c9 100644
--- a/src/modules/MeasureTool/MeasureToolCore/packages.config
+++ b/src/modules/MeasureTool/MeasureToolCore/packages.config
@@ -4,5 +4,5 @@
-
+
\ No newline at end of file
diff --git a/src/modules/MouseUtils/MouseUtils.UITests/MouseHighlighterTests.cs b/src/modules/MouseUtils/MouseUtils.UITests/MouseHighlighterTests.cs
index aae502ef4d..c165a1f2cf 100644
--- a/src/modules/MouseUtils/MouseUtils.UITests/MouseHighlighterTests.cs
+++ b/src/modules/MouseUtils/MouseUtils.UITests/MouseHighlighterTests.cs
@@ -245,16 +245,17 @@ namespace MouseUtils.UITests
}
expectedColor = "#" + expectedColor;
-
+ Task.Delay(100).Wait();
var location = Session.GetMousePosition();
int radius = int.Parse(settings.Radius, CultureInfo.InvariantCulture);
- var colorLeftClick = GetPixelColorString(location.Item1, location.Item2);
+ var colorLeftClick = this.GetPixelColorString(location.Item1, location.Item2);
Assert.AreEqual(expectedColor, colorLeftClick);
- var colorLeftClick2 = GetPixelColorString(location.Item1 + radius - 1, location.Item2);
+ var colorLeftClick2 = this.GetPixelColorString(location.Item1 + radius - 1, location.Item2);
+
Assert.AreEqual(expectedColor, colorLeftClick2);
- var colorBackground = GetPixelColorString(location.Item1 + radius + 50, location.Item2 + radius + 50);
+ var colorBackground = this.GetPixelColorString(location.Item1 + radius + 50, location.Item2 + radius + 50);
Assert.AreNotEqual(expectedColor, colorBackground);
// Drag the mouse
@@ -268,14 +269,14 @@ namespace MouseUtils.UITests
Task.Delay(2000).Wait();
location = Session.GetMousePosition();
- colorLeftClick = GetPixelColorString(location.Item1, location.Item2);
+ colorLeftClick = this.GetPixelColorString(location.Item1, location.Item2);
Assert.AreEqual(expectedColor, colorLeftClick);
- colorLeftClick2 = GetPixelColorString(location.Item1 + radius - 1, location.Item2);
+ colorLeftClick2 = this.GetPixelColorString(location.Item1 + radius - 1, location.Item2);
Assert.AreEqual(expectedColor, colorLeftClick2);
- colorBackground = GetPixelColorString(location.Item1 + radius + 50, location.Item2 + radius + 50);
+ colorBackground = this.GetPixelColorString(location.Item1 + radius + 50, location.Item2 + radius + 50);
Assert.AreNotEqual(expectedColor, colorBackground);
if (action == "leftClick")
@@ -289,7 +290,7 @@ namespace MouseUtils.UITests
int duration = int.Parse(settings.FadeDuration, CultureInfo.InvariantCulture);
Task.Delay(duration + 100).Wait();
- colorLeftClick = GetPixelColorString(location.Item1, location.Item2);
+ colorLeftClick = this.GetPixelColorString(location.Item1, location.Item2);
Assert.AreNotEqual("#" + settings.PrimaryButtonHighlightColor, colorLeftClick);
}
diff --git a/src/modules/MouseUtils/MouseUtils.UITests/MouseJumpTests.cs b/src/modules/MouseUtils/MouseUtils.UITests/MouseJumpTests.cs
index 3ad4637f73..cedc0eb2dd 100644
--- a/src/modules/MouseUtils/MouseUtils.UITests/MouseJumpTests.cs
+++ b/src/modules/MouseUtils/MouseUtils.UITests/MouseJumpTests.cs
@@ -223,6 +223,18 @@ namespace MouseUtils.UITests
Task.Delay(2000).Wait();
}
+ // Goto Hosts File Editor setting page
+ if (this.FindAll("Mouse utilities").Count == 0)
+ {
+ RestartScopeExe();
+ Session.SetMainWindowSize(WindowSize.Large);
+ Task.Delay(1000).Wait();
+
+ // Expand Advanced list-group if needed
+ this.Find("Input / Output").ClickCenter();
+ Task.Delay(2000).Wait();
+ }
+
// Click on the Mouse utilities
// Task.Delay(2000).Wait();
if (firstTime)
diff --git a/src/modules/MouseUtils/MouseUtils.UITests/Release-Test-Checklist-Migration-Progress.md b/src/modules/MouseUtils/MouseUtils.UITests/Release-Test-Checklist-Migration-Progress.md
index b99f8babe9..87e0140b31 100644
--- a/src/modules/MouseUtils/MouseUtils.UITests/Release-Test-Checklist-Migration-Progress.md
+++ b/src/modules/MouseUtils/MouseUtils.UITests/Release-Test-Checklist-Migration-Progress.md
@@ -56,7 +56,7 @@ Mouse Pointer Crosshairs:
Mouse Jump:
* Enable Mouse Jump. Then:
- [x] Press the activation shortcut and verify the screens preview appears.
- - [x] Change activation shortcut and verify that new shorctut triggers Mouse Jump.
+ - [x] Change activation shortcut and verify that new shortcut triggers Mouse Jump.
- [x] Click around the screen preview and ensure that mouse cursor jumped to clicked location.
- [ ] Reorder screens in Display settings and confirm that Mouse Jump reflects the change and still works correctly.
- [ ] Change scaling of screens and confirm that Mouse Jump still works correctly.
diff --git a/src/modules/MouseUtils/MouseUtils.UITests/util/IOUtil.cs b/src/modules/MouseUtils/MouseUtils.UITests/util/IOUtil.cs
index 95ed7ddb8c..1b55600279 100644
--- a/src/modules/MouseUtils/MouseUtils.UITests/util/IOUtil.cs
+++ b/src/modules/MouseUtils/MouseUtils.UITests/util/IOUtil.cs
@@ -9,6 +9,12 @@ using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
+// The MouseUtils module relies on simulating system-level input events (such as mouse movement or key presses) to test visual or behavioral responses.
+// The UI Test framework provides built-in methods for simulating mouse movement and clicks, which work for MouseUtils reliably on high-performance dev boxes.
+// However, on low-performance environments such as CI/CD pipelines or virtual machines, these simulated input events are not always correctly recognized by the operating system.
+// IOUtils class is added specifically for MouseUtils tests.
+// For any test scenario that involves simulating continuous mouse movement (e.g., detecting crosshair changes while moving the cursor),
+// input simulation methods in IOUtils class should be used.
namespace MouseUtils.UITests
{
public class IOUtil
diff --git a/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp b/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp
index 67799aa6c5..6bb823453f 100644
--- a/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp
+++ b/src/modules/MouseWithoutBorders/ModuleInterface/dllmain.cpp
@@ -567,7 +567,7 @@ public:
executable_args.append(L"\" & echo \"Adding an inbound firewall rule for PowerToys.MouseWithoutBorders.exe\"");
executable_args.append(L" & netsh advfirewall firewall add rule name=\"PowerToys.MouseWithoutBorders\" dir=in action=allow program=\"");
executable_args.append(executable_path);
- executable_args.append(L"\" enable=yes remoteip=LocalSubnet profile=any protocol=tcp & pause\"");
+ executable_args.append(L"\" enable=yes remoteip=any profile=any protocol=tcp & pause\"");
SHELLEXECUTEINFOW sei{ sizeof(sei) };
sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI };
diff --git a/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp b/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp
index 7075da2ea7..5cf36fc039 100644
--- a/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp
+++ b/src/modules/Workspaces/WorkspacesLauncher/AppLauncher.cpp
@@ -25,6 +25,7 @@ namespace AppLauncher
const std::wstring ChromeFilename = L"chrome.exe";
const std::wstring ChromePwaFilename = L"chrome_proxy.exe";
const std::wstring PwaCommandLineAddition = L"--profile-directory=Default --app-id=";
+ const std::wstring SteamProtocolPrefix = L"steam:";
}
Result LaunchApp(const std::wstring& appPath, const std::wstring& commandLineArgs, bool elevated)
@@ -134,12 +135,11 @@ namespace AppLauncher
}
}
- // win32 app with appUserModelId:
- // usage example: steam games
- if (!launched && !app.appUserModelId.empty())
+ // protocol launch for steam
+ if (!launched && !app.appUserModelId.empty() && app.appUserModelId.contains(NonLocalizable::SteamProtocolPrefix))
{
Logger::trace(L"Launching {} as {}", app.name, app.appUserModelId);
- auto res = LaunchApp(L"shell:AppsFolder\\" + app.appUserModelId, app.commandLineArgs, app.isElevated);
+ auto res = LaunchApp(app.appUserModelId, app.commandLineArgs, app.isElevated);
if (res.isOk())
{
launched = true;
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/dllmain.cpp b/src/modules/cmdpal/CmdPalModuleInterface/dllmain.cpp
index 48bfcd1411..9b9ce7ec56 100644
--- a/src/modules/cmdpal/CmdPalModuleInterface/dllmain.cpp
+++ b/src/modules/cmdpal/CmdPalModuleInterface/dllmain.cpp
@@ -217,7 +217,9 @@ public:
CmdPal::m_enabled.store(true);
std::wstring packageName = L"Microsoft.CommandPalette";
- std::wstring launchPath = L"x-cmdpal://background";
+ // Launch CmdPal as normal user using explorer
+ std::wstring launchPath = L"explorer.exe";
+ std::wstring launchArgs = L"x-cmdpal://background";
#ifdef IS_DEV_BRANDING
packageName = L"Microsoft.CommandPalette.Dev";
#endif
@@ -268,13 +270,13 @@ public:
if (!firstEnableCall)
{
Logger::trace("Not first attempt, try to launch");
- LaunchApp(launchPath, L"", false /*no elevated*/, false /*error pop up*/);
+ LaunchApp(launchPath, launchArgs, false /*no elevated*/, false /*error pop up*/);
}
else
{
// If first time enable, do retry launch.
Logger::trace("First attempt, try to launch");
- std::thread launchThread(&CmdPal::RetryLaunch, launchPath);
+ std::thread launchThread(&CmdPal::RetryLaunch, launchPath, launchArgs);
launchThread.detach();
}
@@ -289,14 +291,14 @@ public:
CmdPal::m_enabled.store(false);
}
- static void RetryLaunch(std::wstring path)
+ static void RetryLaunch(std::wstring path, std::wstring cmdArgs)
{
const int base_delay_milliseconds = 1000;
int max_retry = 9; // 2**9 - 1 seconds. Control total wait time within 10 min.
int retry = 0;
do
{
- auto launch_result = LaunchApp(path, L"", false, retry < max_retry);
+ auto launch_result = LaunchApp(path, cmdArgs, false, retry < max_retry);
if (launch_result)
{
Logger::info(L"CmdPal launched successfully after {} retries.", retry);
@@ -348,4 +350,4 @@ std::atomic CmdPal::m_launched{ false };
extern "C" __declspec(dllexport) PowertoyModuleIface* __cdecl powertoy_create()
{
return new CmdPal();
-}
\ 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/ExtensionTemplate/TemplateCmdPalExtension/Directory.Packages.props b/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/Directory.Packages.props
index 7a8dfdc97a..cf286b3822 100644
--- a/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/Directory.Packages.props
+++ b/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/Directory.Packages.props
@@ -1,4 +1,4 @@
-
+true
@@ -9,7 +9,7 @@
-
+
diff --git a/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/TemplateCmdPalExtension/TemplateCmdPalExtension.csproj b/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/TemplateCmdPalExtension/TemplateCmdPalExtension.csproj
index 72e6d7400b..af4ca3525d 100644
--- a/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/TemplateCmdPalExtension/TemplateCmdPalExtension.csproj
+++ b/src/modules/cmdpal/ExtensionTemplate/TemplateCmdPalExtension/TemplateCmdPalExtension/TemplateCmdPalExtension.csproj
@@ -1,4 +1,4 @@
-
+WinExeTemplateCmdPalExtension
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj b/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
index 5f83ca54e1..0112da1b0b 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
+++ b/src/modules/cmdpal/Microsoft.CmdPal.Common/Microsoft.CmdPal.Common.csproj
@@ -1,4 +1,4 @@
-
+
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionForm.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionForm.cs
index aca45f3494..14cd4a0e16 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionForm.cs
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/NewExtensionForm.cs
@@ -55,7 +55,7 @@ internal sealed partial class NewExtensionForm : NewExtensionFormBase
"errorMessage": {{FormatJsonString(Properties.Resources.builtin_create_extension_name_required)}},
"id": "ExtensionName",
"placeholder": "ExtensionName",
- "regex": "^[^\\s]+$"
+ "regex": "^[a-zA-Z_][a-zA-Z0-9_]*$"
},
{
"type": "TextBlock",
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemViewModel.cs
index ab7990e781..48542ba628 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemViewModel.cs
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ListItemViewModel.cs
@@ -107,17 +107,17 @@ public partial class ListItemViewModel(IListItem model, WeakReference
+ {
+ var vm = new TagViewModel(t, PageContext);
+ vm.InitializeProperties();
+ return vm;
+ })
+ .ToList() ?? [];
+
DoOnUiThread(
() =>
{
- var newTags = newTagsFromModel?.Select(t =>
- {
- var vm = new TagViewModel(t, PageContext);
- vm.InitializeProperties();
- return vm;
- })
- .ToList() ?? [];
-
// Tags being an ObservableCollection instead of a List lead to
// many COM exception issues.
Tags = new(newTags);
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs
index 5552304ca2..5c4d961aa7 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.Designer.cs
@@ -178,7 +178,7 @@ namespace Microsoft.CmdPal.UI.ViewModels.Properties {
}
///
- /// Looks up a localized string similar to Extension name is required, without spaces.
+ /// Looks up a localized string similar to Extension name is required and must be a valid C# identifier (start with a letter or underscore, followed by letters, numbers, or underscores).
///
public static string builtin_create_extension_name_required {
get {
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx
index 4dc5a1539f..a1755ab097 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Properties/Resources.resx
@@ -195,7 +195,7 @@
Extension name
- Extension name is required, without spaces
+ Extension name is required and must be a valid C# identifier (start with a letter or underscore, followed by letters, numbers, or underscores)Display name
diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs
index d86831d0a1..d9212733eb 100644
--- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs
+++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/ShellViewModel.cs
@@ -4,7 +4,6 @@
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
-using CommunityToolkit.Common;
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Messaging;
@@ -109,13 +108,11 @@ public partial class ShellViewModel(IServiceProvider _serviceProvider, TaskSched
// TODO GH #239 switch back when using the new MD text block
// _ = _queue.EnqueueAsync(() =>
_ = Task.Factory.StartNew(
- async () =>
+ () =>
{
// bool f = await viewModel.InitializeCommand.ExecutionTask.;
// var result = viewModel.InitializeCommand.ExecutionTask.GetResultOrDefault()!;
// var result = viewModel.InitializeCommand.ExecutionTask.GetResultOrDefault()!;
- var result = await viewModel.InitializeAsync();
-
CurrentPage = viewModel; // result ? viewModel : null;
////LoadedState = result ? ViewModelLoadedState.Loaded : ViewModelLoadedState.Error;
},
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..43c890dd31 100644
--- a/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj
+++ b/src/modules/cmdpal/Microsoft.Terminal.UI/Microsoft.Terminal.UI.vcxproj
@@ -1,9 +1,9 @@
-
+
..\..\..\..\
- $(PathToRoot)packages\Microsoft.WindowsAppSDK.1.7.250401001
+ $(PathToRoot)packages\Microsoft.WindowsAppSDK.1.7.250513003
@@ -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/ext/Microsoft.CmdPal.Ext.Calc/Helper/CalculateHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Helper/CalculateHelper.cs
index acab3d7b96..deb441cfe2 100644
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Helper/CalculateHelper.cs
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Helper/CalculateHelper.cs
@@ -35,7 +35,7 @@ public static class CalculateHelper
{
if (string.IsNullOrWhiteSpace(input))
{
- throw new ArgumentNullException(paramName: nameof(input));
+ return false;
}
if (!RegValidExpressChar.IsMatch(input))
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Helper/QueryHelper.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Helper/QueryHelper.cs
index 6b1e62ae03..7cbdf4035f 100644
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Helper/QueryHelper.cs
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Helper/QueryHelper.cs
@@ -23,6 +23,9 @@ public static partial class QueryHelper
CultureInfo inputCulture = settings.InputUseEnglishFormat ? new CultureInfo("en-us") : CultureInfo.CurrentCulture;
CultureInfo outputCulture = settings.OutputUseEnglishFormat ? new CultureInfo("en-us") : CultureInfo.CurrentCulture;
+ // In case the user pastes a query with a leading =
+ query = query.TrimStart('=');
+
// Happens if the user has only typed the action key so far
if (string.IsNullOrEmpty(query))
{
@@ -32,6 +35,11 @@ public static partial class QueryHelper
NumberTranslator translator = NumberTranslator.Create(inputCulture, new CultureInfo("en-US"));
var input = translator.Translate(query.Normalize(NormalizationForm.FormKC));
+ if (string.IsNullOrWhiteSpace(input))
+ {
+ return ErrorHandler.OnError(isFallbackSearch, query, Properties.Resources.calculator_expression_empty);
+ }
+
if (!CalculateHelper.InputValid(input))
{
return null;
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.Designer.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.Designer.cs
index 8cd385be32..8759c1209f 100644
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.Designer.cs
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.Designer.cs
@@ -132,6 +132,15 @@ namespace Microsoft.CmdPal.Ext.Calc.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Please enter an expression.
+ ///
+ public static string calculator_expression_empty {
+ get {
+ return ResourceManager.GetString("calculator_expression_empty", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to Expression wrong or incomplete.
///
diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.resx b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.resx
index 3c50d3a1c5..dba2ba2067 100644
--- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.resx
+++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Calc/Properties/Resources.resx
@@ -199,4 +199,7 @@
Copy binary
+
+ Please enter an expression
+
\ No newline at end of file
diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/JsonSerializationContext.cs b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/JsonSerializationContext.cs
index 6d92cdc146..6a0dde88cc 100644
--- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/JsonSerializationContext.cs
+++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/JsonSerializationContext.cs
@@ -16,6 +16,6 @@ namespace Microsoft.CommandPalette.Extensions.Toolkit;
[JsonSerializable(typeof(List))]
[JsonSerializable(typeof(Dictionary), TypeInfoPropertyName = "Dictionary")]
[JsonSourceGenerationOptions(UseStringEnumConverter = true, WriteIndented = true)]
-internal partial class JsonSerializationContext : JsonSerializerContext
+internal sealed partial class JsonSerializationContext : JsonSerializerContext
{
}
diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchOption.cs b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchOption.cs
index 5f56c5a5b0..9f740e4ade 100644
--- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchOption.cs
+++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchOption.cs
@@ -5,8 +5,6 @@
using System;
using System.Runtime.CompilerServices;
-[assembly: InternalsVisibleTo("Microsoft.Plugin.Program.UnitTests")]
-
namespace Microsoft.CommandPalette.Extensions.Toolkit;
public partial class MatchOption
diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchResult.cs b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchResult.cs
index ad61733f9e..3848065f25 100644
--- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchResult.cs
+++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions.Toolkit/MatchResult.cs
@@ -4,8 +4,6 @@
using System.Runtime.CompilerServices;
-[assembly: InternalsVisibleTo("Microsoft.Plugin.Program.UnitTests")]
-
namespace Microsoft.CommandPalette.Extensions.Toolkit;
public partial class MatchResult
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..4ceae15953 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
@@ -15,6 +15,12 @@
None
+
+ true
+ true
+ $(MSBuildThisFileDirectory)..\..\..\..\..\.pipelines\272MSSharedLibSN2048.snk
+
+
Microsoft.CommandPalette.Extensions$(OutDir)
@@ -51,6 +57,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..5383686a55 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
@@ -1,8 +1,8 @@
-
+
..\..\..\..\..\
- $(PathToRoot)packages\Microsoft.WindowsAppSDK.1.7.250401001
+ $(PathToRoot)packages\Microsoft.WindowsAppSDK.1.7.250513003$(PathToRoot)packages\Microsoft.Windows.CppWinRT.2.0.240111.5$(PathToRoot)packages\Microsoft.Windows.SDK.BuildTools.10.0.22621.2428$(PathToRoot)packages\Microsoft.Web.WebView2.1.0.2903.40
@@ -180,12 +180,4 @@
-
-
-
-
-
- {cc6e41ac-8174-4e8a-8d22-85dd7f4851df}
-
-
diff --git a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config
index 608661db25..6a27f0cdda 100644
--- a/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config
+++ b/src/modules/cmdpal/extensionsdk/Microsoft.CommandPalette.Extensions/packages.config
@@ -3,5 +3,5 @@
-
+
\ No newline at end of file
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..8270e7bb4a 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) {
@@ -61,6 +69,10 @@ if (($BuildStep -ieq "all") -Or ($BuildStep -ieq "build")) {
("/p:VersionNumber="+$VersionOfSDK)
)
+ if ($IsAzurePipelineBuild) {
+ $msbuildArgs += "/p:CIBuild=true"
+ }
+
& $msbuildPath $msbuildArgs
}
}
diff --git a/src/modules/fancyzones/FancyZones.FuzzTests/FancyZones.FuzzTests.csproj b/src/modules/fancyzones/FancyZones.FuzzTests/FancyZones.FuzzTests.csproj
new file mode 100644
index 0000000000..9890b67217
--- /dev/null
+++ b/src/modules/fancyzones/FancyZones.FuzzTests/FancyZones.FuzzTests.csproj
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+ ..\..\..\..\$(Platform)\$(Configuration)\tests\FancyZones.FuzzTests\
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PreserveNewest
+
+
+
+
diff --git a/src/modules/fancyzones/FancyZones.FuzzTests/FuzzTests.cs b/src/modules/fancyzones/FancyZones.FuzzTests/FuzzTests.cs
new file mode 100644
index 0000000000..3bc846089f
--- /dev/null
+++ b/src/modules/fancyzones/FancyZones.FuzzTests/FuzzTests.cs
@@ -0,0 +1,86 @@
+// Copyright (c) Microsoft Corporation
+// The Microsoft Corporation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using System.Text.Json;
+using FancyZonesEditorCommon.Data;
+using FancyZonesEditorCommon.Utils;
+using static FancyZonesEditorCommon.Data.CustomLayouts;
+
+namespace FancyZones.FuzzTests
+{
+ public class FuzzTests
+ {
+ public static void FuzzGridFromJsonElement(ReadOnlySpan input)
+ {
+ if (input.Length < 4)
+ {
+ return;
+ }
+
+ int inputData = BitConverter.ToInt32(input.Slice(0, 4));
+
+ // mock user input for custom-layouts.json
+ string mockCustomLayouts = $@"{{""custom-layouts"": [{{
+ ""uuid"": ""{{B8C275E-A7BC-485F-A35C-67B69164F51F}}"",
+ ""name"": ""Custom layout 1"",
+ ""type"": ""grid"",
+ ""info"": {{
+ ""rows"": {inputData},
+ ""columns"": {inputData},
+ ""rows-percentage"": [ {inputData} ],
+ ""columns-percentage"": [ {inputData}, {inputData}, {inputData} ],
+ ""cell-child-map"": [ [{inputData}, {inputData}, {inputData}] ],
+ ""show-spacing"": true,
+ ""spacing"": {inputData},
+ ""sensitivity-radius"": {inputData}
+ }}
+ }}]}}";
+
+ CustomLayoutListWrapper wrapper;
+ try
+ {
+ wrapper = JsonSerializer.Deserialize(mockCustomLayouts, JsonOptions);
+ }
+ catch (JsonException)
+ {
+ return;
+ }
+
+ List customLayouts = wrapper.CustomLayouts;
+
+ if (customLayouts == null)
+ {
+ return;
+ }
+
+ // Get Layout Info from mockCustomLayouts
+ foreach (var zoneSet in customLayouts)
+ {
+ if (zoneSet.Uuid == null || zoneSet.Uuid.Length == 0)
+ {
+ return;
+ }
+
+ CustomLayouts deserializer = new CustomLayouts();
+
+ // Fuzzing the deserializer
+ _ = deserializer.GridFromJsonElement(zoneSet.Info.GetRawText());
+ }
+ }
+
+ private static JsonSerializerOptions JsonOptions
+ {
+ get
+ {
+ return new JsonSerializerOptions
+ {
+ PropertyNamingPolicy = new DashCaseNamingPolicy(),
+ WriteIndented = true,
+ };
+ }
+ }
+ }
+}
diff --git a/src/modules/fancyzones/FancyZones.FuzzTests/MSTestSettings.cs b/src/modules/fancyzones/FancyZones.FuzzTests/MSTestSettings.cs
new file mode 100644
index 0000000000..5b05c0b86e
--- /dev/null
+++ b/src/modules/fancyzones/FancyZones.FuzzTests/MSTestSettings.cs
@@ -0,0 +1,5 @@
+// Copyright (c) Microsoft Corporation
+// The Microsoft Corporation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+[assembly: Parallelize(Scope = ExecutionScope.MethodLevel)]
diff --git a/src/modules/fancyzones/FancyZones.FuzzTests/OneFuzzConfig.json b/src/modules/fancyzones/FancyZones.FuzzTests/OneFuzzConfig.json
new file mode 100644
index 0000000000..01abd5594e
--- /dev/null
+++ b/src/modules/fancyzones/FancyZones.FuzzTests/OneFuzzConfig.json
@@ -0,0 +1,51 @@
+{
+ "configVersion": 3,
+ "entries": [
+ {
+ "fuzzer": {
+ "$type": "libfuzzerDotNet",
+ "dll": "FancyZones.FuzzTests.dll",
+ "class": "FancyZones.FuzzTests.FuzzTests",
+ "method": "FuzzGridFromJsonElement",
+ "FuzzingTargetBinaries": [
+ "PowerToys.FancyZones.dll"
+ ]
+ },
+ "adoTemplate": {
+ // supply the values appropriate to your
+ // project, where bugs will be filed
+ "org": "microsoft",
+ "project": "OS",
+ "AssignedTo": "mengyuanchen@microsoft.com",
+ "AreaPath": "OS\\Windows Client and Services\\WinPD\\DEEP-Developer Experience, Ecosystem and Partnerships\\SHINE\\PowerToys",
+ "IterationPath": "OS\\Future"
+ },
+ "jobNotificationEmail": "mengyuanchen@microsoft.com",
+ "skip": false,
+ "rebootAfterSetup": false,
+ "oneFuzzJobs": [
+ // at least one job is required
+ {
+ "projectName": "FancyZones",
+ "targetName": "FancyZones-dotnet-fuzzer-FuzzGridFromJsonElement"
+ }
+ ],
+ "jobDependencies": [
+ // this should contain, at minimum,
+ // the DLL and PDB files
+ // you will need to add any other files required
+ // (globs are supported)
+ "FancyZones.FuzzTests.dll",
+ "FancyZones.FuzzTests.pdb",
+ "Microsoft.Windows.SDK.NET.dll",
+ "Newtonsoft.Json.dll",
+ "System.IO.Abstractions.dll",
+ "Testably.Abstractions.FileSystem.Interface.dll",
+ "TestableIO.System.IO.Abstractions.dll",
+ "TestableIO.System.IO.Abstractions.Wrappers.dll",
+ "WinRT.Runtime.dll"
+ ],
+ "SdlWorkItemId": 49911822
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs b/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs
index 078cc770a4..f045e45ea6 100644
--- a/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs
+++ b/src/modules/fancyzones/UITests-FancyZones/LayoutApplyHotKeyTests.cs
@@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
+using System.Threading;
using System.Threading.Tasks;
using System.Windows.Automation;
using FancyZonesEditor.Models;
@@ -15,13 +16,11 @@ using Microsoft.VisualStudio.TestTools.UnitTesting;
using static FancyZonesEditorCommon.Data.CustomLayouts;
using static Microsoft.FancyZonesEditor.UnitTests.Utils.FancyZonesEditorHelper;
-namespace Microsoft.FancyZones.UITests
+namespace UITests_FancyZones
{
[TestClass]
public class LayoutApplyHotKeyTests : UITestBase
{
- private static readonly string WindowName = "Windows (C:) - File Explorer"; // set launch explorer window name
-
public LayoutApplyHotKeyTests()
: base(PowerToysModule.PowerToysSettings)
{
@@ -218,7 +217,6 @@ namespace Microsoft.FancyZones.UITests
[TestInitialize]
public void TestInitialize()
{
- this.RestartScopeExe();
FancyZonesEditorHelper.Files.Restore();
EditorParameters editorParameters = new EditorParameters();
FancyZonesEditorHelper.Files.ParamsIOHelper.WriteData(editorParameters.Serialize(Parameters));
@@ -283,14 +281,31 @@ namespace Microsoft.FancyZones.UITests
this.OpenFancyZonesPanel();
this.ControlQuickLayoutSwitch(true);
- SendKeys(Key.Win, Key.Ctrl, Key.Alt, Key.Num0);
+ // Set Hotkey
this.AttachFancyZonesEditor();
- var element = this.Find("Grid custom layout");
+ var layout = "Grid custom layout";
+ Session.Find(layout).Find