diff --git a/.pipelines/applyXamlStyling.ps1 b/.pipelines/applyXamlStyling.ps1
index 8f890d2a91..c360d18a03 100644
--- a/.pipelines/applyXamlStyling.ps1
+++ b/.pipelines/applyXamlStyling.ps1
@@ -39,7 +39,7 @@ param(
Write-Output "Use 'Help .\applyXamlStyling.ps1' for more info or '-Main' to run against all files."
Write-Output ""
Write-Output "Restoring dotnet tools..."
-dotnet tool restore
+dotnet tool restore --disable-parallel --no-cache
if (-not $Passive)
{
diff --git a/.pipelines/ci/templates/build-powertoys-steps.yml b/.pipelines/ci/templates/build-powertoys-steps.yml
index 23cd60f191..d151a39257 100644
--- a/.pipelines/ci/templates/build-powertoys-steps.yml
+++ b/.pipelines/ci/templates/build-powertoys-steps.yml
@@ -7,6 +7,12 @@ steps:
submodules: true
clean: true
+- task: UseDotNet@2
+ displayName: 'Use .NET 6 SDK'
+ inputs:
+ packageType: sdk
+ version: '6.x'
+
- task: PowerShell@2
displayName: Verify XAML formatting
inputs:
@@ -56,11 +62,18 @@ steps:
arguments: -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
pwsh: true
+- task: PowerShell@2
+ displayName: Verify and set latest VCToolsVersion usage
+ inputs:
+ filePath: '$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1'
+ pwsh: true
+
- task: UseDotNet@2
- displayName: 'Use .NET 7 SDK'
+ displayName: 'Use .NET 8 SDK'
inputs:
packageType: sdk
- version: '7.x'
+ version: '8.x'
+ includePreviewVersions: true
- task: VisualStudioTestPlatformInstaller@1
displayName: Ensure VSTest Platform
diff --git a/.pipelines/release.yml b/.pipelines/release.yml
index ae62f47df7..d28596e0f6 100644
--- a/.pipelines/release.yml
+++ b/.pipelines/release.yml
@@ -88,10 +88,16 @@ extends:
version: '6.x'
- task: UseDotNet@2
- displayName: 'Use .NET 7 SDK'
+ displayName: 'Use .NET 8 SDK'
inputs:
packageType: sdk
- version: '7.x'
+ version: '8.x'
+
+ - task: PowerShell@2
+ displayName: Verify and set latest VCToolsVersion usage
+ inputs:
+ filePath: '$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1'
+ pwsh: true
- task: NuGetAuthenticate@1
diff --git a/.pipelines/verifyAndSetLatestVCToolsVersion.ps1 b/.pipelines/verifyAndSetLatestVCToolsVersion.ps1
new file mode 100644
index 0000000000..1644c01e73
--- /dev/null
+++ b/.pipelines/verifyAndSetLatestVCToolsVersion.ps1
@@ -0,0 +1,5 @@
+$LatestVCToolsVersion = (([xml](& 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe' -latest -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -include packages -format xml)).instances.instance.packages.package | ? { $_.id -eq "Microsoft.VisualCpp.Redist.14.Latest" -and $_.chip -eq "x64" }).version;
+
+Write-Output "Latest VCToolsVersion: $LatestVCToolsVersion"
+Write-Output "Updating VCToolsVersion environment variable for job"
+Write-Output "##vso[task.setvariable variable=VCToolsVersion]$LatestVCToolsVersion"
\ No newline at end of file
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 185b6c2159..3044c228f7 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -25,17 +25,17 @@
-
-
+
+
-
-
-
-
+
+
+
+
-
+
@@ -57,17 +57,17 @@
-
-
-
-
+
+
+
+
-
+
-
-
-
+
+
+
diff --git a/NOTICE.md b/NOTICE.md
index 0396e96d8c..70984db089 100644
--- a/NOTICE.md
+++ b/NOTICE.md
@@ -1270,7 +1270,6 @@ EXHIBIT A -Mozilla Public License.
- CommunityToolkit.Mvvm 8.2.0
- CommunityToolkit.WinUI.Animations 8.0.230907
-- CommunityToolkit.WinUI.Collections 8.0.230907
- CommunityToolkit.WinUI.Controls.Primitives 8.0.230907
- CommunityToolkit.WinUI.Controls.Segmented 8.0.230907
- CommunityToolkit.WinUI.Controls.SettingsControls 8.0.230907
@@ -1287,16 +1286,16 @@ EXHIBIT A -Mozilla Public License.
- LazyCache 2.4.0
- Mages 2.0.1
- Markdig.Signed 0.27.0
-- Microsoft.CodeAnalysis.NetAnalyzers 7.0.3
-- Microsoft.Data.Sqlite 7.0.0
-- Microsoft.Extensions.DependencyInjection 7.0.0
-- Microsoft.Extensions.Hosting 7.0.1
-- Microsoft.Extensions.Hosting.WindowsServices 7.0.0
-- Microsoft.Extensions.Logging 7.0.0
+- Microsoft.CodeAnalysis.NetAnalyzers 8.0.0
+- Microsoft.Data.Sqlite 8.0.0
+- Microsoft.Extensions.DependencyInjection 8.0.0
+- Microsoft.Extensions.Hosting 8.0.0
+- Microsoft.Extensions.Hosting.WindowsServices 8.0.0
+- Microsoft.Extensions.Logging 8.0.0
- Microsoft.NET.Test.Sdk 17.6.3
- Microsoft.Toolkit.Uwp.Notifications 7.1.2
- Microsoft.Web.WebView2 1.0.2088.41
-- Microsoft.Windows.Compatibility 7.0.3
+- Microsoft.Windows.Compatibility 8.0.0
- Microsoft.Windows.CsWin32 0.2.46-beta
- Microsoft.Windows.CsWinRT 2.0.4
- Microsoft.Windows.SDK.BuildTools 10.0.22621.756
@@ -1315,17 +1314,17 @@ EXHIBIT A -Mozilla Public License.
- StreamJsonRpc 2.14.24
- StyleCop.Analyzers 1.2.0-beta.507
- System.CommandLine 2.0.0-beta4.22272.1
-- System.ComponentModel.Composition 7.0.0
-- System.Configuration.ConfigurationManager 6.0.0
-- System.Data.OleDb 7.0.0
-- System.Drawing.Common 7.0.0
+- System.ComponentModel.Composition 8.0.0
+- System.Configuration.ConfigurationManager 8.0.0
+- System.Data.OleDb 8.0.0
+- System.Drawing.Common 8.0.0
- System.IO.Abstractions 17.2.3
- System.IO.Abstractions.TestingHelpers 17.2.3
-- System.Management 7.0.2
+- System.Management 8.0.0
- System.Reactive 6.0.0-preview.9
-- System.Runtime.Caching 7.0.0
-- System.ServiceProcess.ServiceController 7.0.1
-- System.Text.Encoding.CodePages 7.0.0
+- System.Runtime.Caching 8.0.0
+- System.ServiceProcess.ServiceController 8.0.0
+- System.Text.Encoding.CodePages 8.0.0
- UnicodeInformation 2.6.0
- UnitsNet 4.145.0
- UTF.Unknown 2.5.1
diff --git a/installer/PowerToysSetup/PowerToysInstaller.wixproj b/installer/PowerToysSetup/PowerToysInstaller.wixproj
index 9992d919ae..6a4f3b80cb 100644
--- a/installer/PowerToysSetup/PowerToysInstaller.wixproj
+++ b/installer/PowerToysSetup/PowerToysInstaller.wixproj
@@ -2,7 +2,6 @@
-
Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC
IF NOT DEFINED IsPipeline (
-call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.19041.0
+call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=amd64 -host_arch=amd64 -winsdk=10.0.19041.0 -vcvars_ver=$(VCToolsVersion)
SET PTRoot=$(SolutionDir)\..
call "..\..\..\publish.cmd" x64
)
@@ -21,7 +20,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\Assets\Monaco\monacoSRC
IF NOT DEFINED IsPipeline (
-call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0
+call "$([MSBuild]::GetVsInstallRoot())\Common7\Tools\VsDevCmd.bat" -arch=arm64 -host_arch=amd64 -winsdk=10.0.19041.0 -vcvars_ver=$(VCToolsVersion)
SET PTRoot=$(SolutionDir)\..
call "..\..\..\publish.cmd" arm64
)
@@ -194,5 +193,4 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
SuppressRegistry="false"
SuppressRootDirectory="true"/>
-
\ No newline at end of file
diff --git a/installer/PowerToysSetup/publish.cmd b/installer/PowerToysSetup/publish.cmd
index 1baf824d1b..18fa40b4aa 100644
--- a/installer/PowerToysSetup/publish.cmd
+++ b/installer/PowerToysSetup/publish.cmd
@@ -4,13 +4,10 @@ IF NOT DEFINED PTRoot (SET PTRoot=..\..)
SET PlatformArg=%1
IF NOT DEFINED PlatformArg (SET PlatformArg=x64)
+SET VCToolsVersion=!VCToolsVersion!
+SET ClearDevCommandPromptEnvVars=false
rem In case of Release we should not use Debug CRT in VCRT forwarders
-msbuild !PTRoot!\src\settings-ui\Settings.UI\PowerToys.Settings.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:PowerToysRoot=!PTRoot! -p:AppxBundle=Never -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
-
-rem In case of Release we should not use Debug CRT in VCRT forwarders
-msbuild !PTRoot!\src\modules\launcher\PowerLauncher\PowerLauncher.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
-
msbuild !PTRoot!\src\modules\previewpane\MonacoPreviewHandler\MonacoPreviewHandler.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
msbuild !PTRoot!\src\modules\previewpane\MarkdownPreviewHandler\MarkdownPreviewHandler.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
@@ -18,5 +15,3 @@ msbuild !PTRoot!\src\modules\previewpane\MarkdownPreviewHandler\MarkdownPreviewH
msbuild !PTRoot!\src\modules\previewpane\SvgPreviewHandler\SvgPreviewHandler.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
msbuild !PTRoot!\src\modules\previewpane\SvgThumbnailProvider\SvgThumbnailProvider.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
-
-msbuild !PTRoot!\src\modules\FileLocksmith\FileLocksmithUI\FileLocksmithUI.csproj -t:Publish -p:Configuration="Release" -p:Platform="!PlatformArg!" -p:AppxBundle=Never -p:PowerToysRoot=!PTRoot! -p:VCRTForwarders-IncludeDebugCRT=false -p:PublishProfile=InstallationPublishProfile.pubxml
diff --git a/src/.editorconfig b/src/.editorconfig
index 8a147c55e3..68812c52b9 100644
--- a/src/.editorconfig
+++ b/src/.editorconfig
@@ -97,3 +97,48 @@ dotnet_diagnostic.IDE0065.severity = none
# IDE0009: Add this or Me qualification
dotnet_diagnostic.IDE0009.severity = none
+
+# CA1859: Change type for improved performance
+dotnet_diagnostic.CA1859.severity = none
+
+# CA1716: Identifiers should not match keywords
+dotnet_diagnostic.CA1716.severity = none
+
+# SYSLIB1096: Convert to 'GeneratedComInterface'
+dotnet_diagnostic.SYSLIB1096.severity = silent
+
+# CA1309: Use ordinal StringComparison
+dotnet_diagnostic.CA1309.severity = suggestion
+
+# CS1615: Argument may not be passed with the ref keyword
+dotnet_diagnostic.CS1615.severity = none
+
+# CA1854: Prefer a 'TryGetValue' call over a Dictionary indexer access guarded by a 'ContainsKey' check to avoid double lookup
+dotnet_diagnostic.CA1854.severity = suggestion
+
+# CA1860: Avoid using 'Enumerable.Any()' extension method
+dotnet_diagnostic.CA1860.severity = suggestion
+
+# CA1861: Prefer 'static readonly' fields over constant array arguments if the called method is called repeatedly and is not mutating the passed array
+dotnet_diagnostic.CA1861.severity = suggestion
+
+# CA1862: Prefer using 'StringComparer'/'StringComparison' to perform case-insensitive string comparisons
+dotnet_diagnostic.CA1862.severity = suggestion
+
+# CA1863: Cache a CompositeFormat for repeated use in this formatting operation
+dotnet_diagnostic.CA1863.severity = none
+
+# CA1864: Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
+dotnet_diagnostic.CA1864.severity = suggestion
+
+# CA1865: Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
+dotnet_diagnostic.CA1865.severity = suggestion
+
+# CA1869: Cache and reuse 'JsonSerializerOptions' instances
+dotnet_diagnostic.CA1869.severity = none
+
+# CA2208: Instantiate argument exceptions correctly
+dotnet_diagnostic.CA2208.severity = none
+
+# CS9191: The 'ref' modifier for argument corresponding to 'in' is equivalent to 'in'. Consider using 'in' instead.
+dotnet_diagnostic.CS9191.severity = none
diff --git a/src/common/AllExperiments/AllExperiments.csproj b/src/common/AllExperiments/AllExperiments.csproj
index 65ca2c95b6..875d8b5d82 100644
--- a/src/common/AllExperiments/AllExperiments.csproj
+++ b/src/common/AllExperiments/AllExperiments.csproj
@@ -1,7 +1,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
enable
diff --git a/src/common/AllExperiments/Experiments.cs b/src/common/AllExperiments/Experiments.cs
index 38ac694637..426e7af1d1 100644
--- a/src/common/AllExperiments/Experiments.cs
+++ b/src/common/AllExperiments/Experiments.cs
@@ -76,9 +76,10 @@ namespace AllExperiments
if (jsonDictionary != null)
{
- if (!jsonDictionary.ContainsKey("dataversion"))
+ if (!jsonDictionary.TryGetValue("dataversion", out object? value))
{
- jsonDictionary.Add("dataversion", dataVersion);
+ value = dataVersion;
+ jsonDictionary.Add("dataversion", value);
}
if (!jsonDictionary.ContainsKey("variantassignment"))
@@ -87,7 +88,7 @@ namespace AllExperiments
}
else
{
- var jsonDataVersion = jsonDictionary["dataversion"].ToString();
+ var jsonDataVersion = value.ToString();
if (jsonDataVersion != null && int.Parse(jsonDataVersion, CultureInfo.InvariantCulture) < dataVersion)
{
jsonDictionary["dataversion"] = dataVersion;
@@ -116,9 +117,9 @@ namespace AllExperiments
if (jsonDictionary != null)
{
- if (jsonDictionary.ContainsKey("variantassignment"))
+ if (jsonDictionary.TryGetValue("variantassignment", out object? value))
{
- if (jsonDictionary["variantassignment"].ToString() == "alternate" && AssignmentUnit != string.Empty)
+ if (value.ToString() == "alternate" && AssignmentUnit != string.Empty)
{
IsExperiment = true;
}
diff --git a/src/common/Common.UI/Common.UI.csproj b/src/common/Common.UI/Common.UI.csproj
index a4475f640c..102fc3ebbc 100644
--- a/src/common/Common.UI/Common.UI.csproj
+++ b/src/common/Common.UI/Common.UI.csproj
@@ -2,7 +2,7 @@
- net7.0-windows
+ net8.0-windows
win-x64;win-arm64
true
PowerToys.Common.UI
diff --git a/src/common/FilePreviewCommon/FilePreviewCommon.csproj b/src/common/FilePreviewCommon/FilePreviewCommon.csproj
index b0e64db6f6..f10873559f 100644
--- a/src/common/FilePreviewCommon/FilePreviewCommon.csproj
+++ b/src/common/FilePreviewCommon/FilePreviewCommon.csproj
@@ -3,7 +3,7 @@
- net7.0-windows
+ net8.0-windows
win-x64;win-arm64
$(Version).0
Microsoft Corporation
diff --git a/src/common/GPOWrapperProjection/GPOWrapperProjection.csproj b/src/common/GPOWrapperProjection/GPOWrapperProjection.csproj
index 3fd2a3d1b9..5e16a1bae8 100644
--- a/src/common/GPOWrapperProjection/GPOWrapperProjection.csproj
+++ b/src/common/GPOWrapperProjection/GPOWrapperProjection.csproj
@@ -1,7 +1,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
enable
diff --git a/src/common/ManagedCommon/ColorFormatHelper.cs b/src/common/ManagedCommon/ColorFormatHelper.cs
index 8c40ea4978..08e62b921d 100644
--- a/src/common/ManagedCommon/ColorFormatHelper.cs
+++ b/src/common/ManagedCommon/ColorFormatHelper.cs
@@ -328,13 +328,13 @@ namespace ManagedCommon
char paramFormat;
string paramType = formatString.Substring(formatterPosition + 1, 2);
int paramCount = 3;
- if (DefaultFormatTypes.ContainsKey(paramType))
+ if (DefaultFormatTypes.TryGetValue(paramType, out char value))
{
// check the next char, which could be a formatter
if (formatterPosition >= formatString.Length - 3)
{
// not enough characters, end of string, no formatter, use the default one
- paramFormat = DefaultFormatTypes[paramType];
+ paramFormat = value;
paramCount = 2;
}
else
@@ -344,7 +344,7 @@ namespace ManagedCommon
// check if it a valid formatter
if (!FormatTypeToStringFormatters.ContainsKey(paramFormat))
{
- paramFormat = DefaultFormatTypes[paramType];
+ paramFormat = value;
paramCount = 2;
}
}
diff --git a/src/common/ManagedCommon/ManagedCommon.csproj b/src/common/ManagedCommon/ManagedCommon.csproj
index 05f9bd34e1..53ca704109 100644
--- a/src/common/ManagedCommon/ManagedCommon.csproj
+++ b/src/common/ManagedCommon/ManagedCommon.csproj
@@ -3,7 +3,7 @@
- net7.0-windows
+ net8.0-windows
win-x64;win-arm64
$(Version).0
Microsoft Corporation
diff --git a/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj b/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj
index 72dfa4fafd..19e1b0015c 100644
--- a/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj
+++ b/src/common/ManagedTelemetry/Telemetry/ManagedTelemetry.csproj
@@ -2,7 +2,7 @@
- net7.0-windows
+ net8.0-windows
win-x64;win-arm64
$(Version).0
Microsoft Corporation
diff --git a/src/common/interop/PowerToys.Interop.vcxproj b/src/common/interop/PowerToys.Interop.vcxproj
index 5469432cd0..3f792f85ce 100644
--- a/src/common/interop/PowerToys.Interop.vcxproj
+++ b/src/common/interop/PowerToys.Interop.vcxproj
@@ -25,7 +25,7 @@
16.0
{F055103B-F80B-4D0C-BF48-057C55620033}
- net7.0-windows
+ net8.0-windows
ManagedCProj
PowerToysInterop
PowerToys.Interop
diff --git a/src/common/interop/interop-tests/Microsoft.Interop.Tests.csproj b/src/common/interop/interop-tests/Microsoft.Interop.Tests.csproj
index a89ba3f7ec..1847d53075 100644
--- a/src/common/interop/interop-tests/Microsoft.Interop.Tests.csproj
+++ b/src/common/interop/interop-tests/Microsoft.Interop.Tests.csproj
@@ -2,7 +2,7 @@
- net7.0-windows
+ net8.0-windows
false
win-x64;win-arm64
diff --git a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariables.csproj b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariables.csproj
index 8d10c65e2c..4d544d3b65 100644
--- a/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariables.csproj
+++ b/src/modules/EnvironmentVariables/EnvironmentVariables/EnvironmentVariables.csproj
@@ -3,12 +3,12 @@
WinExe
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
EnvironmentVariables
app.manifest
- win10-x64;win10-arm64
+ win-x64;win-arm64
true
true
true
@@ -34,10 +34,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
diff --git a/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj b/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj
index 6335ae919e..50ba1ec7da 100644
--- a/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj
+++ b/src/modules/FileLocksmith/FileLocksmithLibInterop/FileLocksmithLibInterop.vcxproj
@@ -31,7 +31,7 @@
Win32Proj
{c604b37e-9d0e-4484-8778-e8b31b0e1b3a}
FileLocksmithLibInterop
- net7.0-windows
+ net8.0-windows
..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\
PowerToys.FileLocksmithLib.Interop
diff --git a/src/modules/FileLocksmith/FileLocksmithUI/FileLocksmithUI.csproj b/src/modules/FileLocksmith/FileLocksmithUI/FileLocksmithUI.csproj
index 1adec90526..6d5ada2cef 100644
--- a/src/modules/FileLocksmith/FileLocksmithUI/FileLocksmithUI.csproj
+++ b/src/modules/FileLocksmith/FileLocksmithUI/FileLocksmithUI.csproj
@@ -5,14 +5,14 @@
PowerToys.FileLocksmith
PowerToys File Locksmith
WinExe
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps
PowerToys.FileLocksmithUI
PowerToys.FileLocksmithUI
app.manifest
- win10-x64;win10-arm64
+ win-x64;win-arm64
true
true
false
@@ -35,10 +35,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
diff --git a/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml b/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml
index 1a0c71a859..800c6473ca 100644
--- a/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml
+++ b/src/modules/FileLocksmith/FileLocksmithUI/Properties/PublishProfiles/InstallationPublishProfile.pubxml
@@ -5,11 +5,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
FileSystem
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
$(PowerToysRoot)\$(Platform)\$(Configuration)\WinUI3Apps
- win10-$(Platform)
+ win-$(Platform)
true
False
False
diff --git a/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj b/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj
index 3cbcdab9ec..c4ee03077a 100644
--- a/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj
+++ b/src/modules/Hosts/Hosts.Tests/Hosts.Tests.csproj
@@ -2,10 +2,10 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
- win10-x64;win10-arm64
+ win-x64;win-arm64
false
false
false
diff --git a/src/modules/Hosts/Hosts/Hosts.csproj b/src/modules/Hosts/Hosts/Hosts.csproj
index f884172d9a..ba13f01b00 100644
--- a/src/modules/Hosts/Hosts/Hosts.csproj
+++ b/src/modules/Hosts/Hosts/Hosts.csproj
@@ -3,12 +3,12 @@
WinExe
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
Hosts
app.manifest
- win10-x64;win10-arm64
+ win-x64;win-arm64
true
true
None
@@ -34,10 +34,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
diff --git a/src/modules/Hosts/HostsModuleInterface/dllmain.cpp b/src/modules/Hosts/HostsModuleInterface/dllmain.cpp
index e089c06975..85077c8dbe 100644
--- a/src/modules/Hosts/HostsModuleInterface/dllmain.cpp
+++ b/src/modules/Hosts/HostsModuleInterface/dllmain.cpp
@@ -51,9 +51,9 @@ private:
HANDLE m_hProcess = nullptr;
- HANDLE m_hShowEvent;
+ HANDLE m_hShowEvent{};
- HANDLE m_hShowAdminEvent;
+ HANDLE m_hShowAdminEvent{};
bool is_process_running()
{
diff --git a/src/modules/MeasureTool/MeasureToolUI/MeasureToolUI.csproj b/src/modules/MeasureTool/MeasureToolUI/MeasureToolUI.csproj
index 23365eedc3..789b4e5ace 100644
--- a/src/modules/MeasureTool/MeasureToolUI/MeasureToolUI.csproj
+++ b/src/modules/MeasureTool/MeasureToolUI/MeasureToolUI.csproj
@@ -5,14 +5,14 @@
PowerToys.MeasureTool
PowerToys MeasureTool
WinExe
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps
PowerToys.MeasureToolUI
PowerToys.MeasureToolUI
app.manifest
x86;x64;arm64
- win10-x86;win10-x64;win10-arm64
+ win-x86;win-x64;win-arm64
true
true
false
@@ -35,10 +35,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
diff --git a/src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj b/src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj
index 701ef550a6..86100f4a8d 100644
--- a/src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj
+++ b/src/modules/MouseUtils/MouseJumpUI.UnitTests/MouseJumpUI.UnitTests.csproj
@@ -2,7 +2,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
{D9C5DE64-6849-4278-91AD-9660AECF2876}
diff --git a/src/modules/MouseUtils/MouseJumpUI/Helpers/LayoutHelper.cs b/src/modules/MouseUtils/MouseJumpUI/Helpers/LayoutHelper.cs
index 768a6f8ddd..025bba1d6e 100644
--- a/src/modules/MouseUtils/MouseJumpUI/Helpers/LayoutHelper.cs
+++ b/src/modules/MouseUtils/MouseJumpUI/Helpers/LayoutHelper.cs
@@ -16,10 +16,7 @@ internal static class LayoutHelper
public static LayoutInfo CalculateLayoutInfo(
LayoutConfig layoutConfig)
{
- if (layoutConfig is null)
- {
- throw new ArgumentNullException(nameof(layoutConfig));
- }
+ ArgumentNullException.ThrowIfNull(layoutConfig);
var builder = new LayoutInfo.Builder
{
diff --git a/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj b/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj
index d8cbe38df9..d2ec254c04 100644
--- a/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj
+++ b/src/modules/MouseUtils/MouseJumpUI/MouseJumpUI.csproj
@@ -17,10 +17,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
@@ -32,7 +32,7 @@
WinExe
MouseJumpUI
PowerToys.MouseJumpUI
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
diff --git a/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs b/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs
index 7a0562b845..33f5289419 100644
--- a/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs
+++ b/src/modules/MouseWithoutBorders/App/Class/Common.Encryption.cs
@@ -115,7 +115,7 @@ namespace MouseWithoutBorders
byte[] rv;
string myKey = Common.MyKey;
- if (!LegalKeyDictionary.ContainsKey(myKey))
+ if (!LegalKeyDictionary.TryGetValue(myKey, out byte[] value))
{
Rfc2898DeriveBytes key = new(
myKey,
@@ -127,7 +127,7 @@ namespace MouseWithoutBorders
}
else
{
- rv = LegalKeyDictionary[myKey];
+ rv = value;
}
return rv;
diff --git a/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj b/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj
index af7ac9c3b3..18bf39e7e3 100644
--- a/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj
+++ b/src/modules/MouseWithoutBorders/App/Helper/MouseWithoutBordersHelper.csproj
@@ -1,7 +1,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
WinExe
@@ -19,10 +19,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
diff --git a/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj b/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj
index d84499b839..2e7a227a47 100644
--- a/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj
+++ b/src/modules/MouseWithoutBorders/App/MouseWithoutBorders.csproj
@@ -1,7 +1,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
WinExe
@@ -19,10 +19,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
diff --git a/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj b/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj
index cd9de124a7..8a7d487fc5 100644
--- a/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj
+++ b/src/modules/MouseWithoutBorders/App/Service/MouseWithoutBordersService.csproj
@@ -1,7 +1,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
true
@@ -20,10 +20,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
TRACE;DEBUG;SHOW_ON_WINLOGON CODE_ANALYSIS CUSTOMIZE_LOGON_SCREEN
diff --git a/src/modules/PowerOCR/PowerOCR/Helpers/WrappingStream.cs b/src/modules/PowerOCR/PowerOCR/Helpers/WrappingStream.cs
index fc49112ef6..5b952d1f73 100644
--- a/src/modules/PowerOCR/PowerOCR/Helpers/WrappingStream.cs
+++ b/src/modules/PowerOCR/PowerOCR/Helpers/WrappingStream.cs
@@ -220,9 +220,6 @@ public class WrappingStream : Stream
private void ThrowIfDisposed()
{
// throws an ObjectDisposedException if this object has been disposed
- if (_streamBase == null)
- {
- throw new ObjectDisposedException(GetType().Name);
- }
+ ObjectDisposedException.ThrowIf(_streamBase == null, this);
}
}
diff --git a/src/modules/PowerOCR/PowerOCR/PowerOCR.csproj b/src/modules/PowerOCR/PowerOCR/PowerOCR.csproj
index 4116b0889c..10887afce7 100644
--- a/src/modules/PowerOCR/PowerOCR/PowerOCR.csproj
+++ b/src/modules/PowerOCR/PowerOCR/PowerOCR.csproj
@@ -15,10 +15,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
@@ -28,7 +28,7 @@
PowerOCRLogo.png
PowerOCR
PowerToys.PowerOCR
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
{2150E333-8FDC-42A3-9474-1A3956D46DE8}
diff --git a/src/modules/awake/Awake/Awake.csproj b/src/modules/awake/Awake/Awake.csproj
index 58576db33c..9f09482fdb 100644
--- a/src/modules/awake/Awake/Awake.csproj
+++ b/src/modules/awake/Awake/Awake.csproj
@@ -2,7 +2,7 @@
WinExe
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
win-x64;win-arm64
@@ -24,10 +24,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
diff --git a/src/modules/awake/Awake/Core/ExtensionMethods.cs b/src/modules/awake/Awake/Core/ExtensionMethods.cs
index 00d07fe799..d669791b3f 100644
--- a/src/modules/awake/Awake/Core/ExtensionMethods.cs
+++ b/src/modules/awake/Awake/Core/ExtensionMethods.cs
@@ -11,15 +11,9 @@ namespace Awake.Core
{
public static void AddRange(this ICollection target, IEnumerable source)
{
- if (target == null)
- {
- throw new ArgumentNullException(nameof(target));
- }
+ ArgumentNullException.ThrowIfNull(target);
- if (source == null)
- {
- throw new ArgumentNullException(nameof(source));
- }
+ ArgumentNullException.ThrowIfNull(source);
foreach (var element in source)
{
diff --git a/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj b/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj
index ed1926d3ae..41516fb3f3 100644
--- a/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj
+++ b/src/modules/colorPicker/ColorPickerUI/ColorPickerUI.csproj
@@ -14,10 +14,10 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
@@ -25,7 +25,7 @@
WinExe
ColorPicker
PowerToys.ColorPickerUI
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
diff --git a/src/modules/colorPicker/ColorPickerUI/Common/RangeObservableCollection.cs b/src/modules/colorPicker/ColorPickerUI/Common/RangeObservableCollection.cs
index 599890bdac..7c9e87f092 100644
--- a/src/modules/colorPicker/ColorPickerUI/Common/RangeObservableCollection.cs
+++ b/src/modules/colorPicker/ColorPickerUI/Common/RangeObservableCollection.cs
@@ -28,10 +28,7 @@ namespace ColorPicker.Common
public void AddRange(IEnumerable list)
{
- if (list == null)
- {
- throw new ArgumentNullException(nameof(list));
- }
+ ArgumentNullException.ThrowIfNull(list);
_suppressNotification = true;
diff --git a/src/modules/colorPicker/UnitTest-ColorPickerUI/UnitTest-ColorPickerUI.csproj b/src/modules/colorPicker/UnitTest-ColorPickerUI/UnitTest-ColorPickerUI.csproj
index e9cf5ee42a..009be36014 100644
--- a/src/modules/colorPicker/UnitTest-ColorPickerUI/UnitTest-ColorPickerUI.csproj
+++ b/src/modules/colorPicker/UnitTest-ColorPickerUI/UnitTest-ColorPickerUI.csproj
@@ -2,7 +2,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
{090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}
diff --git a/src/modules/fancyzones/UnitTests-FancyZonesEditor/UnitTests-FancyZonesEditor.csproj b/src/modules/fancyzones/UnitTests-FancyZonesEditor/UnitTests-FancyZonesEditor.csproj
index a146ad62b2..8d1972207f 100644
--- a/src/modules/fancyzones/UnitTests-FancyZonesEditor/UnitTests-FancyZonesEditor.csproj
+++ b/src/modules/fancyzones/UnitTests-FancyZonesEditor/UnitTests-FancyZonesEditor.csproj
@@ -1,7 +1,7 @@
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
enable
diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj b/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj
index 6c876344dd..dae02ff5ba 100644
--- a/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj
+++ b/src/modules/fancyzones/editor/FancyZonesEditor/FancyZonesEditor.csproj
@@ -17,15 +17,15 @@
- win10-x64
+ win-x64
- win10-arm64
+ win-arm64
{5CCC8468-DEC8-4D36-99D4-5C891BEBD481}
- net7.0-windows10.0.20348.0
+ net8.0-windows10.0.20348.0
10.0.19041.0
10.0.19041.0
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/Models/LayoutHotkeysModel.cs b/src/modules/fancyzones/editor/FancyZonesEditor/Models/LayoutHotkeysModel.cs
index 54311b4b03..f8b783768a 100644
--- a/src/modules/fancyzones/editor/FancyZonesEditor/Models/LayoutHotkeysModel.cs
+++ b/src/modules/fancyzones/editor/FancyZonesEditor/Models/LayoutHotkeysModel.cs
@@ -43,12 +43,12 @@ namespace FancyZonesEditor.Models
public bool SelectKey(string key, string uuid)
{
- if (!SelectedKeys.ContainsKey(key))
+ if (!SelectedKeys.TryGetValue(key, out string value))
{
return false;
}
- if (SelectedKeys[key] == uuid)
+ if (value == uuid)
{
return true;
}
diff --git a/src/modules/fancyzones/editor/FancyZonesEditor/Utils/RelayCommand.cs b/src/modules/fancyzones/editor/FancyZonesEditor/Utils/RelayCommand.cs
index ecb0d0f285..d24f7cdfd3 100644
--- a/src/modules/fancyzones/editor/FancyZonesEditor/Utils/RelayCommand.cs
+++ b/src/modules/fancyzones/editor/FancyZonesEditor/Utils/RelayCommand.cs
@@ -20,10 +20,7 @@ namespace FancyZonesEditor.Utils
public RelayCommand(Action