🚧 [Dev][Build] .NET 8 Upgrade (#28655)

* Upgraded projects to target .NET 8

* Updated .NET runtime package targets to use latest .NET 8 build

* Updated PowerToys Interop to target .NET 8

* Switch to use ArgumentNullException.ThrowIfNull

* ArgumentNullException.ThrowIfNull for CropAndLockViewModel

* Switching to ObjectDisposedException.ThrowIf

* Upgrade System.ComponentModel.Composition to 8.0

* ArgumentNullException.ThrowIfNull in Helper

* Switch to StartsWith using StringComparison.Ordinal

* Disabled CA1859, CA1716, SYSLIB1096 analyzers

* Update RIDs to reflect breaking changes in .NET 8

* Updated Microsoft NuGet packages to RC1

* Updated Analyzer package to latest .NET 8 preview package

* CA1854: Use TryGetValue instead of ContainsKey

* [Build] Update TFM to .NET 8 for publish profiles

* [Analyzers] Remove CA1309, CA1860-CA1865, CA1869, CA2208 from warning.

* [Analyzers] Fix for C26495

* [Analyzers] Disable CS1615, CS9191

* [CI] Target .NET 8 in YAML

* [CI] Add .NET preview version flag temporarily.

* [FileLocksmith] Update TFM to .NET 8

* [CI] Switch to preview agent

* [CI] Update NOTICE.md

* [CI] Update Release to target .NET 8 and use Preview agent

* [Analyzers] Disable CA1854

* Fix typo

* Updated Microsoft.CodeAnalysis.NetAnalyzers to latest preview

Updated packages to rc2

* [Analyzers][CPP] Turn off warning for 5271

* [Analyzers][CPP] Turn off warning for 26493

* [KeyboardListener] Add mutex include to resolve error

* [PT Run][Folder] Use static SearchValues to resolve CA1870

* [PowerLauncher] Fix TryGetValue

* [MouseJumpSettings] Use ArgumentNullException.ThrowIfNull

* [Build] Disable parallel dotnet tool restore

* [Build] No cache of dotnet tool packages

* [Build] Temporarily move .NET 8 SDK task before XAML formatting

* [Build][Temp] Try using .NET 7 prior to XAML formatting and then switch to .NET 8 after

* [Build] Use .NET 6 for XAML Styler

* [CI] Updated NOTICE.md

* [FancyZones] Update TFM to .NET 8

* [EnvVar] Update TFM to .NET 8 and update RID

* [EnvVar] Use ArgumentNullException.ThrowIfNull

* [Dev] Updated packages to .NET 8 RTM version

* [Dev] Updated Microsoft.CodeAnalysis.NetAnalyzers to latest

* [CI] Updated NOTICE.md with latest package versions

* Fix new utility target fameworks and runtimeids

* Don't use preview images anymore

* [CI] Add script to update VCToolsVersion environment variable

* [CI] Add Step to Verify VCToolsVersion

* [CI] Use latest flag for vswhere to set proper VCToolsVersion

* Add VCToolsVersion checking to release.yml

* Remove net publishing from local/ PR CI builds

* Revert "Remove net publishing from local/ PR CI builds"

This reverts commit f469778996.

* Only publish necessary projects

* Add verbosity to release pipelines builds of PowerTOys

* Set VCToolsVersion for publish.cmd when called from installer

* [Installer] Moved project publish logic to MSBuild Task

* [CI] Revert using publish.cmd

* [CI] Set VCToolsVersion and unset ClearDevCommandPromptEnvVars property

* Installer publishes for x64 too

* Revert "Add verbosity to release pipelines builds of PowerTOys"

This reverts commit 654d4a7f78.

* [Dev] Update CodeAnalysis library to non-preview package

* Remove unneeded warning removal

* Fix Notice.md

* Rename VCToolsVersion file and task name

* Remove unneeded mutex header include

---------

Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
Jeremy Sinclair
2023-11-22 12:46:59 -05:00
committed by GitHub
parent b41129d489
commit b2b2856e52
206 changed files with 473 additions and 841 deletions

View File

@@ -39,7 +39,7 @@ param(
Write-Output "Use 'Help .\applyXamlStyling.ps1' for more info or '-Main' to run against all files." Write-Output "Use 'Help .\applyXamlStyling.ps1' for more info or '-Main' to run against all files."
Write-Output "" Write-Output ""
Write-Output "Restoring dotnet tools..." Write-Output "Restoring dotnet tools..."
dotnet tool restore dotnet tool restore --disable-parallel --no-cache
if (-not $Passive) if (-not $Passive)
{ {

View File

@@ -7,6 +7,12 @@ steps:
submodules: true submodules: true
clean: true clean: true
- task: UseDotNet@2
displayName: 'Use .NET 6 SDK'
inputs:
packageType: sdk
version: '6.x'
- task: PowerShell@2 - task: PowerShell@2
displayName: Verify XAML formatting displayName: Verify XAML formatting
inputs: inputs:
@@ -56,11 +62,18 @@ steps:
arguments: -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln' arguments: -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
pwsh: true pwsh: true
- task: PowerShell@2
displayName: Verify and set latest VCToolsVersion usage
inputs:
filePath: '$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1'
pwsh: true
- task: UseDotNet@2 - task: UseDotNet@2
displayName: 'Use .NET 7 SDK' displayName: 'Use .NET 8 SDK'
inputs: inputs:
packageType: sdk packageType: sdk
version: '7.x' version: '8.x'
includePreviewVersions: true
- task: VisualStudioTestPlatformInstaller@1 - task: VisualStudioTestPlatformInstaller@1
displayName: Ensure VSTest Platform displayName: Ensure VSTest Platform

View File

@@ -88,10 +88,16 @@ extends:
version: '6.x' version: '6.x'
- task: UseDotNet@2 - task: UseDotNet@2
displayName: 'Use .NET 7 SDK' displayName: 'Use .NET 8 SDK'
inputs: inputs:
packageType: sdk 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 - task: NuGetAuthenticate@1

View File

@@ -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"

View File

@@ -25,17 +25,17 @@
<PackageVersion Include="LazyCache" Version="2.4.0" /> <PackageVersion Include="LazyCache" Version="2.4.0" />
<PackageVersion Include="Mages" Version="2.0.1" /> <PackageVersion Include="Mages" Version="2.0.1" />
<PackageVersion Include="Markdig.Signed" Version="0.27.0" /> <PackageVersion Include="Markdig.Signed" Version="0.27.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.3" /> <PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="7.0.0" /> <PackageVersion Include="Microsoft.Data.Sqlite" Version="8.0.0" />
<PackageVersion Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902" /> <PackageVersion Include="Microsoft.DotNet.UpgradeAssistant.Extensions.Default.Analyzers" Version="0.4.336902" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" /> <PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="7.0.0" /> <PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="7.0.1" /> <PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="7.0.0" /> <PackageVersion Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" /> <PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" /> <PackageVersion Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
<PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2088.41" /> <PackageVersion Include="Microsoft.Web.WebView2" Version="1.0.2088.41" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="7.0.3" /> <PackageVersion Include="Microsoft.Windows.Compatibility" Version="8.0.0" />
<PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" /> <PackageVersion Include="Microsoft.Windows.CsWin32" Version="0.2.46-beta" />
<!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. --> <!-- CsWinRT version needs to be set to have a WinRT.Runtime.dll at the same version contained inside the NET SDK we're currently building on CI. -->
<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.4" /> <PackageVersion Include="Microsoft.Windows.CsWinRT" Version="2.0.4" />
@@ -57,17 +57,17 @@
<PackageVersion Include="StreamJsonRpc" Version="2.14.24" /> <PackageVersion Include="StreamJsonRpc" Version="2.14.24" />
<PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" /> <PackageVersion Include="StyleCop.Analyzers" Version="1.2.0-beta.507" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" /> <PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.ComponentModel.Composition" Version="7.0.0" /> <PackageVersion Include="System.ComponentModel.Composition" Version="8.0.0" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="6.0.0" /> <PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageVersion Include="System.Data.OleDb" Version="7.0.0" /> <PackageVersion Include="System.Data.OleDb" Version="8.0.0" />
<PackageVersion Include="System.Drawing.Common" Version="7.0.0" /> <PackageVersion Include="System.Drawing.Common" Version="8.0.0" />
<PackageVersion Include="System.IO.Abstractions" Version="17.2.3" /> <PackageVersion Include="System.IO.Abstractions" Version="17.2.3" />
<PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" /> <PackageVersion Include="System.IO.Abstractions.TestingHelpers" Version="17.2.3" />
<PackageVersion Include="System.Management" Version="7.0.2" /> <PackageVersion Include="System.Management" Version="8.0.0" />
<PackageVersion Include="System.Reactive" Version="6.0.0-preview.9" /> <PackageVersion Include="System.Reactive" Version="6.0.0-preview.9" />
<PackageVersion Include="System.Runtime.Caching" Version="7.0.0" /> <PackageVersion Include="System.Runtime.Caching" Version="8.0.0" />
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="7.0.1" /> <PackageVersion Include="System.ServiceProcess.ServiceController" Version="8.0.0" />
<PackageVersion Include="System.Text.Encoding.CodePages" Version="7.0.0" /> <PackageVersion Include="System.Text.Encoding.CodePages" Version="8.0.0" />
<PackageVersion Include="UnicodeInformation" Version="2.6.0" /> <PackageVersion Include="UnicodeInformation" Version="2.6.0" />
<PackageVersion Include="UnitsNet" Version="4.145.0" /> <PackageVersion Include="UnitsNet" Version="4.145.0" />
<PackageVersion Include="UTF.Unknown" Version="2.5.1" /> <PackageVersion Include="UTF.Unknown" Version="2.5.1" />

View File

@@ -1270,7 +1270,6 @@ EXHIBIT A -Mozilla Public License.
- CommunityToolkit.Mvvm 8.2.0 - CommunityToolkit.Mvvm 8.2.0
- CommunityToolkit.WinUI.Animations 8.0.230907 - CommunityToolkit.WinUI.Animations 8.0.230907
- CommunityToolkit.WinUI.Collections 8.0.230907
- CommunityToolkit.WinUI.Controls.Primitives 8.0.230907 - CommunityToolkit.WinUI.Controls.Primitives 8.0.230907
- CommunityToolkit.WinUI.Controls.Segmented 8.0.230907 - CommunityToolkit.WinUI.Controls.Segmented 8.0.230907
- CommunityToolkit.WinUI.Controls.SettingsControls 8.0.230907 - CommunityToolkit.WinUI.Controls.SettingsControls 8.0.230907
@@ -1287,16 +1286,16 @@ EXHIBIT A -Mozilla Public License.
- LazyCache 2.4.0 - LazyCache 2.4.0
- Mages 2.0.1 - Mages 2.0.1
- Markdig.Signed 0.27.0 - Markdig.Signed 0.27.0
- Microsoft.CodeAnalysis.NetAnalyzers 7.0.3 - Microsoft.CodeAnalysis.NetAnalyzers 8.0.0
- Microsoft.Data.Sqlite 7.0.0 - Microsoft.Data.Sqlite 8.0.0
- Microsoft.Extensions.DependencyInjection 7.0.0 - Microsoft.Extensions.DependencyInjection 8.0.0
- Microsoft.Extensions.Hosting 7.0.1 - Microsoft.Extensions.Hosting 8.0.0
- Microsoft.Extensions.Hosting.WindowsServices 7.0.0 - Microsoft.Extensions.Hosting.WindowsServices 8.0.0
- Microsoft.Extensions.Logging 7.0.0 - Microsoft.Extensions.Logging 8.0.0
- Microsoft.NET.Test.Sdk 17.6.3 - Microsoft.NET.Test.Sdk 17.6.3
- Microsoft.Toolkit.Uwp.Notifications 7.1.2 - Microsoft.Toolkit.Uwp.Notifications 7.1.2
- Microsoft.Web.WebView2 1.0.2088.41 - 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.CsWin32 0.2.46-beta
- Microsoft.Windows.CsWinRT 2.0.4 - Microsoft.Windows.CsWinRT 2.0.4
- Microsoft.Windows.SDK.BuildTools 10.0.22621.756 - Microsoft.Windows.SDK.BuildTools 10.0.22621.756
@@ -1315,17 +1314,17 @@ EXHIBIT A -Mozilla Public License.
- StreamJsonRpc 2.14.24 - StreamJsonRpc 2.14.24
- StyleCop.Analyzers 1.2.0-beta.507 - StyleCop.Analyzers 1.2.0-beta.507
- System.CommandLine 2.0.0-beta4.22272.1 - System.CommandLine 2.0.0-beta4.22272.1
- System.ComponentModel.Composition 7.0.0 - System.ComponentModel.Composition 8.0.0
- System.Configuration.ConfigurationManager 6.0.0 - System.Configuration.ConfigurationManager 8.0.0
- System.Data.OleDb 7.0.0 - System.Data.OleDb 8.0.0
- System.Drawing.Common 7.0.0 - System.Drawing.Common 8.0.0
- System.IO.Abstractions 17.2.3 - System.IO.Abstractions 17.2.3
- System.IO.Abstractions.TestingHelpers 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.Reactive 6.0.0-preview.9
- System.Runtime.Caching 7.0.0 - System.Runtime.Caching 8.0.0
- System.ServiceProcess.ServiceController 7.0.1 - System.ServiceProcess.ServiceController 8.0.0
- System.Text.Encoding.CodePages 7.0.0 - System.Text.Encoding.CodePages 8.0.0
- UnicodeInformation 2.6.0 - UnicodeInformation 2.6.0
- UnitsNet 4.145.0 - UnitsNet 4.145.0
- UTF.Unknown 2.5.1 - UTF.Unknown 2.5.1

View File

@@ -2,7 +2,6 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureNuGetPackageBuildImports" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\wix.props" Condition="Exists('..\wix.props')" /> <Import Project="..\wix.props" Condition="Exists('..\wix.props')" />
<Import Project="..\..\src\Version.props" /> <Import Project="..\..\src\Version.props" />
<PropertyGroup Condition="'$(Platform)' == 'x64'"> <PropertyGroup Condition="'$(Platform)' == 'x64'">
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants> <DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\x64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
<!-- THIS IS AN INNER LOOP OPTIMIZATION <!-- THIS IS AN INNER LOOP OPTIMIZATION
@@ -10,7 +9,7 @@
using a specific profile. If you're doing local installer builds, this will using a specific profile. If you're doing local installer builds, this will
simulate the build pipeline doing that for you. --> simulate the build pipeline doing that for you. -->
<PreBuildEvent>IF NOT DEFINED IsPipeline ( <PreBuildEvent>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)\.. SET PTRoot=$(SolutionDir)\..
call "..\..\..\publish.cmd" x64 call "..\..\..\publish.cmd" x64
) )
@@ -21,7 +20,7 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
<PropertyGroup Condition="'$(Platform)' != 'x64'"> <PropertyGroup Condition="'$(Platform)' != 'x64'">
<DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants> <DefineConstants>Version=$(Version);MonacoSRCHarvestPath=$(ProjectDir)..\..\ARM64\$(Configuration)\Assets\Monaco\monacoSRC</DefineConstants>
<PreBuildEvent>IF NOT DEFINED IsPipeline ( <PreBuildEvent>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)\.. SET PTRoot=$(SolutionDir)\..
call "..\..\..\publish.cmd" arm64 call "..\..\..\publish.cmd" arm64
) )
@@ -194,5 +193,4 @@ call powershell.exe -NonInteractive -executionpolicy Unrestricted -File $(MSBuil
SuppressRegistry="false" SuppressRegistry="false"
SuppressRootDirectory="true"/> SuppressRootDirectory="true"/>
</Target> </Target>
</Project> </Project>

View File

@@ -4,13 +4,10 @@ IF NOT DEFINED PTRoot (SET PTRoot=..\..)
SET PlatformArg=%1 SET PlatformArg=%1
IF NOT DEFINED PlatformArg (SET PlatformArg=x64) 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 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\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 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\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\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

View File

@@ -97,3 +97,48 @@ dotnet_diagnostic.IDE0065.severity = none
# IDE0009: Add this or Me qualification # IDE0009: Add this or Me qualification
dotnet_diagnostic.IDE0009.severity = none 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

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" /> <Import Project="..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>

View File

@@ -76,9 +76,10 @@ namespace AllExperiments
if (jsonDictionary != null) 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")) if (!jsonDictionary.ContainsKey("variantassignment"))
@@ -87,7 +88,7 @@ namespace AllExperiments
} }
else else
{ {
var jsonDataVersion = jsonDictionary["dataversion"].ToString(); var jsonDataVersion = value.ToString();
if (jsonDataVersion != null && int.Parse(jsonDataVersion, CultureInfo.InvariantCulture) < dataVersion) if (jsonDataVersion != null && int.Parse(jsonDataVersion, CultureInfo.InvariantCulture) < dataVersion)
{ {
jsonDictionary["dataversion"] = dataVersion; jsonDictionary["dataversion"] = dataVersion;
@@ -116,9 +117,9 @@ namespace AllExperiments
if (jsonDictionary != null) 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; IsExperiment = true;
} }

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\Version.props" /> <Import Project="..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<AssemblyName>PowerToys.Common.UI</AssemblyName> <AssemblyName>PowerToys.Common.UI</AssemblyName>

View File

@@ -3,7 +3,7 @@
<Import Project="..\..\Version.props" /> <Import Project="..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Version>$(Version).0</Version> <Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors> <Authors>Microsoft Corporation</Authors>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Version.props" /> <Import Project="..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>

View File

@@ -328,13 +328,13 @@ namespace ManagedCommon
char paramFormat; char paramFormat;
string paramType = formatString.Substring(formatterPosition + 1, 2); string paramType = formatString.Substring(formatterPosition + 1, 2);
int paramCount = 3; int paramCount = 3;
if (DefaultFormatTypes.ContainsKey(paramType)) if (DefaultFormatTypes.TryGetValue(paramType, out char value))
{ {
// check the next char, which could be a formatter // check the next char, which could be a formatter
if (formatterPosition >= formatString.Length - 3) if (formatterPosition >= formatString.Length - 3)
{ {
// not enough characters, end of string, no formatter, use the default one // not enough characters, end of string, no formatter, use the default one
paramFormat = DefaultFormatTypes[paramType]; paramFormat = value;
paramCount = 2; paramCount = 2;
} }
else else
@@ -344,7 +344,7 @@ namespace ManagedCommon
// check if it a valid formatter // check if it a valid formatter
if (!FormatTypeToStringFormatters.ContainsKey(paramFormat)) if (!FormatTypeToStringFormatters.ContainsKey(paramFormat))
{ {
paramFormat = DefaultFormatTypes[paramType]; paramFormat = value;
paramCount = 2; paramCount = 2;
} }
} }

View File

@@ -3,7 +3,7 @@
<Import Project="..\..\Version.props" /> <Import Project="..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Version>$(Version).0</Version> <Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors> <Authors>Microsoft Corporation</Authors>

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<Version>$(Version).0</Version> <Version>$(Version).0</Version>
<Authors>Microsoft Corporation</Authors> <Authors>Microsoft Corporation</Authors>

View File

@@ -25,7 +25,7 @@
<PropertyGroup Label="Globals"> <PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion> <VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{F055103B-F80B-4D0C-BF48-057C55620033}</ProjectGuid> <ProjectGuid>{F055103B-F80B-4D0C-BF48-057C55620033}</ProjectGuid>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<Keyword>ManagedCProj</Keyword> <Keyword>ManagedCProj</Keyword>
<RootNamespace>PowerToysInterop</RootNamespace> <RootNamespace>PowerToysInterop</RootNamespace>
<ProjectName>PowerToys.Interop</ProjectName> <ProjectName>PowerToys.Interop</ProjectName>

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>

View File

@@ -3,12 +3,12 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<RootNamespace>EnvironmentVariables</RootNamespace> <RootNamespace>EnvironmentVariables</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<EnableMsixTooling>true</EnableMsixTooling> <EnableMsixTooling>true</EnableMsixTooling>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling> <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
@@ -34,10 +34,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info --> <!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->

View File

@@ -31,7 +31,7 @@
<Keyword>Win32Proj</Keyword> <Keyword>Win32Proj</Keyword>
<ProjectGuid>{c604b37e-9d0e-4484-8778-e8b31b0e1b3a}</ProjectGuid> <ProjectGuid>{c604b37e-9d0e-4484-8778-e8b31b0e1b3a}</ProjectGuid>
<RootNamespace>FileLocksmithLibInterop</RootNamespace> <RootNamespace>FileLocksmithLibInterop</RootNamespace>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<OutDir>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\</OutDir> <OutDir>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps\</OutDir>
<TargetName>PowerToys.FileLocksmithLib.Interop</TargetName> <TargetName>PowerToys.FileLocksmithLib.Interop</TargetName>
</PropertyGroup> </PropertyGroup>

View File

@@ -5,14 +5,14 @@
<AssemblyTitle>PowerToys.FileLocksmith</AssemblyTitle> <AssemblyTitle>PowerToys.FileLocksmith</AssemblyTitle>
<AssemblyDescription>PowerToys File Locksmith</AssemblyDescription> <AssemblyDescription>PowerToys File Locksmith</AssemblyDescription>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath> <OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath>
<RootNamespace>PowerToys.FileLocksmithUI</RootNamespace> <RootNamespace>PowerToys.FileLocksmithUI</RootNamespace>
<AssemblyName>PowerToys.FileLocksmithUI</AssemblyName> <AssemblyName>PowerToys.FileLocksmithUI</AssemblyName>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore> <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
@@ -35,10 +35,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>

View File

@@ -5,11 +5,11 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol> <PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<PublishDir>$(PowerToysRoot)\$(Platform)\$(Configuration)\WinUI3Apps</PublishDir> <PublishDir>$(PowerToysRoot)\$(Platform)\$(Configuration)\WinUI3Apps</PublishDir>
<RuntimeIdentifier>win10-$(Platform)</RuntimeIdentifier> <RuntimeIdentifier>win-$(Platform)</RuntimeIdentifier>
<SelfContained>true</SelfContained> <SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile> <PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun> <PublishReadyToRun>False</PublishReadyToRun>

View File

@@ -2,10 +2,10 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath> <AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>

View File

@@ -3,12 +3,12 @@
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<RootNamespace>Hosts</RootNamespace> <RootNamespace>Hosts</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<RuntimeIdentifiers>win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<EnablePreviewMsixTooling>true</EnablePreviewMsixTooling> <EnablePreviewMsixTooling>true</EnablePreviewMsixTooling>
<WindowsPackageType>None</WindowsPackageType> <WindowsPackageType>None</WindowsPackageType>
@@ -34,10 +34,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info --> <!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->

View File

@@ -51,9 +51,9 @@ private:
HANDLE m_hProcess = nullptr; HANDLE m_hProcess = nullptr;
HANDLE m_hShowEvent; HANDLE m_hShowEvent{};
HANDLE m_hShowAdminEvent; HANDLE m_hShowAdminEvent{};
bool is_process_running() bool is_process_running()
{ {

View File

@@ -5,14 +5,14 @@
<AssemblyTitle>PowerToys.MeasureTool</AssemblyTitle> <AssemblyTitle>PowerToys.MeasureTool</AssemblyTitle>
<AssemblyDescription>PowerToys MeasureTool</AssemblyDescription> <AssemblyDescription>PowerToys MeasureTool</AssemblyDescription>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath> <OutputPath>..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps</OutputPath>
<RootNamespace>PowerToys.MeasureToolUI</RootNamespace> <RootNamespace>PowerToys.MeasureToolUI</RootNamespace>
<AssemblyName>PowerToys.MeasureToolUI</AssemblyName> <AssemblyName>PowerToys.MeasureToolUI</AssemblyName>
<ApplicationManifest>app.manifest</ApplicationManifest> <ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms> <Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x86;win-x64;win-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI> <UseWinUI>true</UseWinUI>
<GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore> <GenerateSatelliteAssembliesForCore>true</GenerateSatelliteAssembliesForCore>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
@@ -35,10 +35,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info --> <!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectGuid>{D9C5DE64-6849-4278-91AD-9660AECF2876}</ProjectGuid> <ProjectGuid>{D9C5DE64-6849-4278-91AD-9660AECF2876}</ProjectGuid>

View File

@@ -16,10 +16,7 @@ internal static class LayoutHelper
public static LayoutInfo CalculateLayoutInfo( public static LayoutInfo CalculateLayoutInfo(
LayoutConfig layoutConfig) LayoutConfig layoutConfig)
{ {
if (layoutConfig is null) ArgumentNullException.ThrowIfNull(layoutConfig);
{
throw new ArgumentNullException(nameof(layoutConfig));
}
var builder = new LayoutInfo.Builder var builder = new LayoutInfo.Builder
{ {

View File

@@ -17,10 +17,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@@ -32,7 +32,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>MouseJumpUI</RootNamespace> <RootNamespace>MouseJumpUI</RootNamespace>
<AssemblyName>PowerToys.MouseJumpUI</AssemblyName> <AssemblyName>PowerToys.MouseJumpUI</AssemblyName>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

View File

@@ -115,7 +115,7 @@ namespace MouseWithoutBorders
byte[] rv; byte[] rv;
string myKey = Common.MyKey; string myKey = Common.MyKey;
if (!LegalKeyDictionary.ContainsKey(myKey)) if (!LegalKeyDictionary.TryGetValue(myKey, out byte[] value))
{ {
Rfc2898DeriveBytes key = new( Rfc2898DeriveBytes key = new(
myKey, myKey,
@@ -127,7 +127,7 @@ namespace MouseWithoutBorders
} }
else else
{ {
rv = LegalKeyDictionary[myKey]; rv = value;
} }
return rv; return rv;

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
@@ -19,10 +19,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <PropertyGroup Condition="'$(Configuration)' == 'Debug'">

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
@@ -19,10 +19,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <PropertyGroup Condition="'$(Configuration)' == 'Debug'">

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ImplicitUsings>true</ImplicitUsings> <ImplicitUsings>true</ImplicitUsings>
@@ -20,10 +20,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<DefineConstants>TRACE;DEBUG;SHOW_ON_WINLOGON CODE_ANALYSIS CUSTOMIZE_LOGON_SCREEN</DefineConstants> <DefineConstants>TRACE;DEBUG;SHOW_ON_WINLOGON CODE_ANALYSIS CUSTOMIZE_LOGON_SCREEN</DefineConstants>

View File

@@ -220,9 +220,6 @@ public class WrappingStream : Stream
private void ThrowIfDisposed() private void ThrowIfDisposed()
{ {
// throws an ObjectDisposedException if this object has been disposed // throws an ObjectDisposedException if this object has been disposed
if (_streamBase == null) ObjectDisposedException.ThrowIf(_streamBase == null, this);
{
throw new ObjectDisposedException(GetType().Name);
}
} }
} }

View File

@@ -15,10 +15,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@@ -28,7 +28,7 @@
<PackageIcon>PowerOCRLogo.png</PackageIcon> <PackageIcon>PowerOCRLogo.png</PackageIcon>
<RootNamespace>PowerOCR</RootNamespace> <RootNamespace>PowerOCR</RootNamespace>
<AssemblyName>PowerToys.PowerOCR</AssemblyName> <AssemblyName>PowerToys.PowerOCR</AssemblyName>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectTypeGuids>{2150E333-8FDC-42A3-9474-1A3956D46DE8}</ProjectTypeGuids> <ProjectTypeGuids>{2150E333-8FDC-42A3-9474-1A3956D46DE8}</ProjectTypeGuids>

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers> <RuntimeIdentifiers>win-x64;win-arm64</RuntimeIdentifiers>
@@ -24,10 +24,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info --> <!-- See https://learn.microsoft.com/windows/apps/develop/platform/csharp-winrt/net-projection-from-cppwinrt-component for more info -->

View File

@@ -11,15 +11,9 @@ namespace Awake.Core
{ {
public static void AddRange<T>(this ICollection<T> target, IEnumerable<T> source) public static void AddRange<T>(this ICollection<T> target, IEnumerable<T> source)
{ {
if (target == null) ArgumentNullException.ThrowIfNull(target);
{
throw new ArgumentNullException(nameof(target));
}
if (source == null) ArgumentNullException.ThrowIfNull(source);
{
throw new ArgumentNullException(nameof(source));
}
foreach (var element in source) foreach (var element in source)
{ {

View File

@@ -14,10 +14,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@@ -25,7 +25,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>ColorPicker</RootNamespace> <RootNamespace>ColorPicker</RootNamespace>
<AssemblyName>PowerToys.ColorPickerUI</AssemblyName> <AssemblyName>PowerToys.ColorPickerUI</AssemblyName>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

View File

@@ -28,10 +28,7 @@ namespace ColorPicker.Common
public void AddRange(IEnumerable<T> list) public void AddRange(IEnumerable<T> list)
{ {
if (list == null) ArgumentNullException.ThrowIfNull(list);
{
throw new ArgumentNullException(nameof(list));
}
_suppressNotification = true; _suppressNotification = true;

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectGuid>{090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}</ProjectGuid> <ProjectGuid>{090CD7B7-3B0C-4D1D-BC98-83EB5D799BC1}</ProjectGuid>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>

View File

@@ -17,15 +17,15 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ProjectGuid>{5CCC8468-DEC8-4D36-99D4-5C891BEBD481}</ProjectGuid> <ProjectGuid>{5CCC8468-DEC8-4D36-99D4-5C891BEBD481}</ProjectGuid>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

View File

@@ -43,12 +43,12 @@ namespace FancyZonesEditor.Models
public bool SelectKey(string key, string uuid) public bool SelectKey(string key, string uuid)
{ {
if (!SelectedKeys.ContainsKey(key)) if (!SelectedKeys.TryGetValue(key, out string value))
{ {
return false; return false;
} }
if (SelectedKeys[key] == uuid) if (value == uuid)
{ {
return true; return true;
} }

View File

@@ -20,10 +20,7 @@ namespace FancyZonesEditor.Utils
public RelayCommand(Action<object> execute, Predicate<object> canExecute) public RelayCommand(Action<object> execute, Predicate<object> canExecute)
{ {
if (execute == null) ArgumentNullException.ThrowIfNull(execute);
{
throw new ArgumentNullException(nameof(execute));
}
_execute = execute; _execute = execute;
_canExecute = canExecute; _canExecute = canExecute;

View File

@@ -20,10 +20,7 @@ namespace FancyZonesEditor.Utils
public RelayCommand(Action<T> execute, Predicate<T> canExecute) public RelayCommand(Action<T> execute, Predicate<T> canExecute)
{ {
if (execute == null) ArgumentNullException.ThrowIfNull(execute);
{
throw new ArgumentNullException(nameof(execute));
}
_execute = execute; _execute = execute;
_canExecute = canExecute; _canExecute = canExecute;

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\Version.props" /> <Import Project="..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectGuid>{E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}</ProjectGuid> <ProjectGuid>{E0CC7526-D85E-43AC-844F-D5DF0D2F5AB8}</ProjectGuid>

View File

@@ -13,10 +13,10 @@
<!-- SelfContained=true requires RuntimeIdentifier to be set --> <!-- SelfContained=true requires RuntimeIdentifier to be set -->
<PropertyGroup Condition="'$(Platform)'=='x64'"> <PropertyGroup Condition="'$(Platform)'=='x64'">
<RuntimeIdentifier>win10-x64</RuntimeIdentifier> <RuntimeIdentifier>win-x64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Platform)'=='ARM64'"> <PropertyGroup Condition="'$(Platform)'=='ARM64'">
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier> <RuntimeIdentifier>win-arm64</RuntimeIdentifier>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
@@ -24,7 +24,7 @@
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>ImageResizer</RootNamespace> <RootNamespace>ImageResizer</RootNamespace>
<AssemblyName>PowerToys.ImageResizer</AssemblyName> <AssemblyName>PowerToys.ImageResizer</AssemblyName>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{BB23A474-5058-4F75-8FA3-5FE3DE53CDF4}</ProjectGuid> <ProjectGuid>{BB23A474-5058-4F75-8FA3-5FE3DE53CDF4}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Community.PowerToys.Run.Plugin.UnitConverter</RootNamespace> <RootNamespace>Community.PowerToys.Run.Plugin.UnitConverter</RootNamespace>

View File

@@ -29,10 +29,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
public void Init(PluginInitContext context) public void Init(PluginInitContext context)
{ {
if (context == null) ArgumentNullException.ThrowIfNull(context);
{
throw new ArgumentNullException(paramName: nameof(context));
}
_context = context; _context = context;
_context.API.ThemeChanged += OnThemeChanged; _context.API.ThemeChanged += OnThemeChanged;
@@ -41,10 +38,7 @@ namespace Community.PowerToys.Run.Plugin.UnitConverter
public List<Result> Query(Query query) public List<Result> Query(Query query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(paramName: nameof(query));
}
// Parse // Parse
ConvertModel convertModel = InputInterpreter.Parse(query); ConvertModel convertModel = InputInterpreter.Parse(query);

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{4D971245-7A70-41D5-BAA0-DDB5684CAF51}</ProjectGuid> <ProjectGuid>{4D971245-7A70-41D5-BAA0-DDB5684CAF51}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Community.PowerToys.Run.Plugin.VSCodeWorkspaces</RootNamespace> <RootNamespace>Community.PowerToys.Run.Plugin.VSCodeWorkspaces</RootNamespace>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{D095BE44-1F2E-463E-A494-121892A75EA2}</ProjectGuid> <ProjectGuid>{D095BE44-1F2E-463E-A494-121892A75EA2}</ProjectGuid>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<Version>$(Version).0</Version> <Version>$(Version).0</Version>

View File

@@ -87,10 +87,7 @@ namespace Community.PowerToys.Run.Plugin.ValueGenerator
public List<Result> Query(Query query) public List<Result> Query(Query query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(paramName: nameof(query));
}
var results = new List<Result>(); var results = new List<Result>();
try try

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{9F94B303-5E21-4364-9362-64426F8DB932}</ProjectGuid> <ProjectGuid>{9F94B303-5E21-4364-9362-64426F8DB932}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Community.PowerToys.Run.Plugin.WebSearch</RootNamespace> <RootNamespace>Community.PowerToys.Run.Plugin.WebSearch</RootNamespace>

View File

@@ -55,10 +55,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
public List<Result> Query(Query query) public List<Result> Query(Query query)
{ {
if (query is null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(nameof(query));
}
var results = new List<Result>(); var results = new List<Result>();

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<RootNamespace>Microsoft.Plugin.Folder.UnitTests</RootNamespace> <RootNamespace>Microsoft.Plugin.Folder.UnitTests</RootNamespace>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>

View File

@@ -23,10 +23,7 @@ namespace Microsoft.Plugin.Folder
public IEnumerable<IItemResult> Results(string actionKeyword, string search) public IEnumerable<IItemResult> Results(string actionKeyword, string search)
{ {
if (search == null) ArgumentNullException.ThrowIfNull(search);
{
throw new ArgumentNullException(nameof(search));
}
if (!_environmentHelper.IsEnvironmentVariable(search)) if (!_environmentHelper.IsEnvironmentVariable(search))
{ {

View File

@@ -58,10 +58,7 @@ namespace Microsoft.Plugin.Folder
public List<Result> Query(Query query) public List<Result> Query(Query query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(paramName: nameof(query));
}
var expandedName = FolderHelper.Expand(query.Search); var expandedName = FolderHelper.Expand(query.Search);
@@ -82,10 +79,7 @@ namespace Microsoft.Plugin.Folder
public static IEnumerable<Result> GetFolderPluginResults(Query query) public static IEnumerable<Result> GetFolderPluginResults(Query query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(paramName: nameof(query));
}
var expandedName = FolderHelper.Expand(query.Search); var expandedName = FolderHelper.Expand(query.Search);

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{787B8AA6-CA93-4C84-96FE-DF31110AD1C4}</ProjectGuid> <ProjectGuid>{787B8AA6-CA93-4C84-96FE-DF31110AD1C4}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Plugin.Folder</RootNamespace> <RootNamespace>Microsoft.Plugin.Folder</RootNamespace>

View File

@@ -11,10 +11,7 @@ namespace Microsoft.Plugin.Folder.Sources
{ {
public bool IsEnvironmentVariable(string search) public bool IsEnvironmentVariable(string search)
{ {
if (search == null) ArgumentNullException.ThrowIfNull(search);
{
throw new ArgumentNullException(paramName: nameof(search));
}
return search.StartsWith('%'); return search.StartsWith('%');
} }

View File

@@ -23,10 +23,7 @@ namespace Microsoft.Plugin.Folder.Sources
public IEnumerable<FolderLink> GetUserFolderResults(string query) public IEnumerable<FolderLink> GetUserFolderResults(string query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(paramName: nameof(query));
}
// Using OrdinalIgnoreCase since this is internal // Using OrdinalIgnoreCase since this is internal
return _folderLinks.FolderLinks() return _folderLinks.FolderLinks()
@@ -35,10 +32,7 @@ namespace Microsoft.Plugin.Folder.Sources
public bool IsDriveOrSharedFolder(string search) public bool IsDriveOrSharedFolder(string search)
{ {
if (search == null) ArgumentNullException.ThrowIfNull(search);
{
throw new ArgumentNullException(nameof(search));
}
// Using Ordinal this is internal and we're comparing symbols // Using Ordinal this is internal and we're comparing symbols
if (search.StartsWith(@"\\", StringComparison.Ordinal)) if (search.StartsWith(@"\\", StringComparison.Ordinal))
@@ -79,10 +73,7 @@ namespace Microsoft.Plugin.Folder.Sources
public static string Expand(string search) public static string Expand(string search)
{ {
if (search == null) ArgumentNullException.ThrowIfNull(search);
{
throw new ArgumentNullException(nameof(search));
}
search = Environment.ExpandEnvironmentVariables(search); search = Environment.ExpandEnvironmentVariables(search);

View File

@@ -24,10 +24,7 @@ namespace Microsoft.Plugin.Folder.Sources
public IEnumerable<IItemResult> Query(string querySearch) public IEnumerable<IItemResult> Query(string querySearch)
{ {
if (querySearch == null) ArgumentNullException.ThrowIfNull(querySearch);
{
throw new ArgumentNullException(nameof(querySearch));
}
return GetEnvironmentVariables(querySearch) return GetEnvironmentVariables(querySearch)
.OrderBy(v => v.Title) .OrderBy(v => v.Title)

View File

@@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information. // See the LICENSE file in the project root for more information.
using System; using System;
using System.Buffers;
using System.Collections.Generic; using System.Collections.Generic;
using System.Collections.Immutable; using System.Collections.Immutable;
using System.Globalization; using System.Globalization;
@@ -15,6 +16,7 @@ namespace Microsoft.Plugin.Folder.Sources
{ {
public class QueryInternalDirectory : IQueryInternalDirectory public class QueryInternalDirectory : IQueryInternalDirectory
{ {
private static readonly SearchValues<char> PathChars = SearchValues.Create("\\/");
private readonly FolderSettings _settings; private readonly FolderSettings _settings;
private readonly IQueryFileSystemInfo _queryFileSystemInfo; private readonly IQueryFileSystemInfo _queryFileSystemInfo;
private readonly IDirectory _directory; private readonly IDirectory _directory;
@@ -51,7 +53,7 @@ namespace Microsoft.Plugin.Folder.Sources
{ {
// if folder doesn't exist, we want to take the last part and use it afterwards to help the user // if folder doesn't exist, we want to take the last part and use it afterwards to help the user
// find the right folder. // find the right folder.
int index = search.LastIndexOfAny(new char[] { '\\', '/' }); int index = search.AsSpan().LastIndexOfAny(PathChars);
// No slashes found, so probably not a folder // No slashes found, so probably not a folder
if (index <= 0 || index >= search.Length - 1) if (index <= 0 || index >= search.Length - 1)
@@ -84,10 +86,7 @@ namespace Microsoft.Plugin.Folder.Sources
public IEnumerable<IItemResult> Query(string search) public IEnumerable<IItemResult> Query(string search)
{ {
if (search == null) ArgumentNullException.ThrowIfNull(search);
{
throw new ArgumentNullException(nameof(search));
}
var processed = Process(search); var processed = Process(search);

View File

@@ -14,20 +14,14 @@ namespace Microsoft.Plugin.Folder.Sources
{ {
public bool Execute(string sanitizedPath, IPublicAPI contextApi) public bool Execute(string sanitizedPath, IPublicAPI contextApi)
{ {
if (contextApi == null) ArgumentNullException.ThrowIfNull(contextApi);
{
throw new ArgumentNullException(nameof(contextApi));
}
return OpenFileOrFolder(sanitizedPath, contextApi); return OpenFileOrFolder(sanitizedPath, contextApi);
} }
public bool ExecuteSanitized(string search, IPublicAPI contextApi) public bool ExecuteSanitized(string search, IPublicAPI contextApi)
{ {
if (contextApi == null) ArgumentNullException.ThrowIfNull(contextApi);
{
throw new ArgumentNullException(nameof(contextApi));
}
return Execute(SanitizedPath(search), contextApi); return Execute(SanitizedPath(search), contextApi);
} }

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{F8B870EB-D5F5-45BA-9CF7-A5C459818820}</ProjectGuid> <ProjectGuid>{F8B870EB-D5F5-45BA-9CF7-A5C459818820}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Plugin.Indexer</RootNamespace> <RootNamespace>Microsoft.Plugin.Indexer</RootNamespace>

View File

@@ -25,10 +25,7 @@ namespace Microsoft.Plugin.Indexer.SearchHelper
public List<SearchResult> ExecuteQuery(ISearchQueryHelper queryHelper, string keyword) public List<SearchResult> ExecuteQuery(ISearchQueryHelper queryHelper, string keyword)
{ {
if (queryHelper == null) ArgumentNullException.ThrowIfNull(queryHelper);
{
throw new ArgumentNullException(paramName: nameof(queryHelper));
}
List<SearchResult> results = new List<SearchResult>(); List<SearchResult> results = new List<SearchResult>();
@@ -70,15 +67,9 @@ namespace Microsoft.Plugin.Indexer.SearchHelper
public static void ModifyQueryHelper(ref ISearchQueryHelper queryHelper, string pattern) public static void ModifyQueryHelper(ref ISearchQueryHelper queryHelper, string pattern)
{ {
if (pattern == null) ArgumentNullException.ThrowIfNull(pattern);
{
throw new ArgumentNullException(paramName: nameof(pattern));
}
if (queryHelper == null) ArgumentNullException.ThrowIfNull(queryHelper);
{
throw new ArgumentNullException(paramName: nameof(queryHelper));
}
// convert file pattern if it is not '*'. Don't create restriction for '*' as it includes all files. // convert file pattern if it is not '*'. Don't create restriction for '*' as it includes all files.
if (pattern != "*") if (pattern != "*")
@@ -101,10 +92,7 @@ namespace Microsoft.Plugin.Indexer.SearchHelper
public static void InitQueryHelper(out ISearchQueryHelper queryHelper, ISearchManager manager, int maxCount, bool displayHiddenFiles) public static void InitQueryHelper(out ISearchQueryHelper queryHelper, ISearchManager manager, int maxCount, bool displayHiddenFiles)
{ {
if (manager == null) ArgumentNullException.ThrowIfNull(manager);
{
throw new ArgumentNullException(nameof(manager));
}
// SystemIndex catalog is the default catalog in Windows // SystemIndex catalog is the default catalog in Windows
ISearchCatalogManager catalogManager = manager.GetCatalog("SystemIndex"); ISearchCatalogManager catalogManager = manager.GetCatalog("SystemIndex");
@@ -136,10 +124,7 @@ namespace Microsoft.Plugin.Indexer.SearchHelper
public IEnumerable<SearchResult> Search(string keyword, ISearchManager manager, string pattern = "*", int maxCount = 30) public IEnumerable<SearchResult> Search(string keyword, ISearchManager manager, string pattern = "*", int maxCount = 30)
{ {
if (manager == null) ArgumentNullException.ThrowIfNull(manager);
{
throw new ArgumentNullException(nameof(manager));
}
ISearchQueryHelper queryHelper; ISearchQueryHelper queryHelper;
InitQueryHelper(out queryHelper, manager, maxCount, DisplayHiddenFiles); InitQueryHelper(out queryHelper, manager, maxCount, DisplayHiddenFiles);

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>

View File

@@ -157,10 +157,7 @@ namespace Microsoft.Plugin.Program
public List<ContextMenuResult> LoadContextMenus(Result selectedResult) public List<ContextMenuResult> LoadContextMenus(Result selectedResult)
{ {
if (selectedResult == null) ArgumentNullException.ThrowIfNull(selectedResult);
{
throw new ArgumentNullException(nameof(selectedResult));
}
var menuOptions = new List<ContextMenuResult>(); var menuOptions = new List<ContextMenuResult>();
if (selectedResult.ContextData is IProgram program) if (selectedResult.ContextData is IProgram program)
@@ -175,15 +172,9 @@ namespace Microsoft.Plugin.Program
{ {
try try
{ {
if (runProcess == null) ArgumentNullException.ThrowIfNull(runProcess);
{
throw new ArgumentNullException(nameof(runProcess));
}
if (info == null) ArgumentNullException.ThrowIfNull(info);
{
throw new ArgumentNullException(nameof(info));
}
runProcess(info); runProcess(info);
} }

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectGuid>{FDB3555B-58EF-4AE6-B5F1-904719637AB4}</ProjectGuid> <ProjectGuid>{FDB3555B-58EF-4AE6-B5F1-904719637AB4}</ProjectGuid>

View File

@@ -44,10 +44,7 @@ namespace Microsoft.Plugin.Program.Programs
public static PackageWrapper GetWrapperFromPackage(Package package) public static PackageWrapper GetWrapperFromPackage(Package package)
{ {
if (package == null) ArgumentNullException.ThrowIfNull(package);
{
throw new ArgumentNullException(nameof(package));
}
string path; string path;
try try

View File

@@ -47,10 +47,7 @@ namespace Microsoft.Plugin.Program.Programs
public UWP(IPackage package) public UWP(IPackage package)
{ {
if (package == null) ArgumentNullException.ThrowIfNull(package);
{
throw new ArgumentNullException(nameof(package));
}
Name = package.Name; Name = package.Name;
FullName = package.FullName; FullName = package.FullName;

View File

@@ -91,10 +91,7 @@ namespace Microsoft.Plugin.Program.Programs
public Result Result(string query, string queryArguments, IPublicAPI api) public Result Result(string query, string queryArguments, IPublicAPI api)
{ {
if (api == null) ArgumentNullException.ThrowIfNull(api);
{
throw new ArgumentNullException(nameof(api));
}
var score = Score(query); var score = Score(query);
if (score <= 0) if (score <= 0)
@@ -130,10 +127,7 @@ namespace Microsoft.Plugin.Program.Programs
public List<ContextMenuResult> ContextMenus(string queryArguments, IPublicAPI api) public List<ContextMenuResult> ContextMenus(string queryArguments, IPublicAPI api)
{ {
if (api == null) ArgumentNullException.ThrowIfNull(api);
{
throw new ArgumentNullException(nameof(api));
}
var contextMenus = new List<ContextMenuResult>(); var contextMenus = new List<ContextMenuResult>();
@@ -229,10 +223,7 @@ namespace Microsoft.Plugin.Program.Programs
public UWPApplication(IAppxManifestApplication manifestApp, UWP package) public UWPApplication(IAppxManifestApplication manifestApp, UWP package)
{ {
if (manifestApp == null) ArgumentNullException.ThrowIfNull(manifestApp);
{
throw new ArgumentNullException(nameof(manifestApp));
}
var hr = manifestApp.GetAppUserModelId(out var tmpUserModelId); var hr = manifestApp.GetAppUserModelId(out var tmpUserModelId);
UserModelId = AppxPackageHelper.CheckHRAndReturnOrThrow(hr, tmpUserModelId); UserModelId = AppxPackageHelper.CheckHRAndReturnOrThrow(hr, tmpUserModelId);

View File

@@ -205,10 +205,7 @@ namespace Microsoft.Plugin.Program.Programs
public Result Result(string query, string queryArguments, IPublicAPI api) public Result Result(string query, string queryArguments, IPublicAPI api)
{ {
if (api == null) ArgumentNullException.ThrowIfNull(api);
{
throw new ArgumentNullException(nameof(api));
}
var score = Score(query); var score = Score(query);
if (score <= 0) if (score <= 0)
@@ -274,10 +271,7 @@ namespace Microsoft.Plugin.Program.Programs
public List<ContextMenuResult> ContextMenus(string queryArguments, IPublicAPI api) public List<ContextMenuResult> ContextMenus(string queryArguments, IPublicAPI api)
{ {
if (api == null) ArgumentNullException.ThrowIfNull(api);
{
throw new ArgumentNullException(nameof(api));
}
var contextMenus = new List<ContextMenuResult>(); var contextMenus = new List<ContextMenuResult>();
@@ -605,10 +599,7 @@ namespace Microsoft.Plugin.Program.Programs
// Function to get the application type, given the path to the application // Function to get the application type, given the path to the application
public static ApplicationType GetAppTypeFromPath(string path) public static ApplicationType GetAppTypeFromPath(string path)
{ {
if (path == null) ArgumentNullException.ThrowIfNull(path);
{
throw new ArgumentNullException(nameof(path));
}
string extension = Extension(path); string extension = Extension(path);
@@ -640,10 +631,7 @@ namespace Microsoft.Plugin.Program.Programs
// Function to get the Win32 application, given the path to the application // Function to get the Win32 application, given the path to the application
public static Win32Program GetAppFromPath(string path) public static Win32Program GetAppFromPath(string path)
{ {
if (path == null) ArgumentNullException.ThrowIfNull(path);
{
throw new ArgumentNullException(nameof(path));
}
Win32Program app; Win32Program app;
switch (GetAppTypeFromPath(path)) switch (GetAppTypeFromPath(path))
@@ -985,10 +973,7 @@ namespace Microsoft.Plugin.Program.Programs
public static IList<Win32Program> All(ProgramPluginSettings settings) public static IList<Win32Program> All(ProgramPluginSettings settings)
{ {
if (settings == null) ArgumentNullException.ThrowIfNull(settings);
{
throw new ArgumentNullException(nameof(settings));
}
try try
{ {

View File

@@ -14,10 +14,7 @@ namespace Microsoft.Plugin.Program.Storage
// On the first occurrence of a different file path, the existing app path is to be returned without removing any more elements from the queue. // On the first occurrence of a different file path, the existing app path is to be returned without removing any more elements from the queue.
public static async Task<string> GetAppPathFromQueueAsync(ConcurrentQueue<string> eventHandlingQueue, int dequeueDelay) public static async Task<string> GetAppPathFromQueueAsync(ConcurrentQueue<string> eventHandlingQueue, int dequeueDelay)
{ {
if (eventHandlingQueue == null) ArgumentNullException.ThrowIfNull(eventHandlingQueue);
{
throw new ArgumentNullException(nameof(eventHandlingQueue));
}
string previousAppPath = string.Empty; string previousAppPath = string.Empty;

View File

@@ -85,10 +85,7 @@ namespace Microsoft.Plugin.Shell
public List<Result> Query(Query query) public List<Result> Query(Query query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(nameof(query));
}
List<Result> results = new List<Result>(); List<Result> results = new List<Result>();
string cmd = query.Search; string cmd = query.Search;

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}</ProjectGuid> <ProjectGuid>{C21BFF9C-2C99-4B5F-B7C9-A5E6DDDB37B0}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Plugin.Shell</RootNamespace> <RootNamespace>Microsoft.Plugin.Shell</RootNamespace>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<RootNamespace>Microsoft.Plugin.Uri.UnitTests</RootNamespace> <RootNamespace>Microsoft.Plugin.Uri.UnitTests</RootNamespace>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{03276a39-d4e9-417c-8ffd-200b0ee5e871}</ProjectGuid> <ProjectGuid>{03276a39-d4e9-417c-8ffd-200b0ee5e871}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Plugin.Uri</RootNamespace> <RootNamespace>Microsoft.Plugin.Uri</RootNamespace>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<RootNamespace>Microsoft.Plugin.WindowWalker.UnitTests</RootNamespace> <RootNamespace>Microsoft.Plugin.WindowWalker.UnitTests</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@@ -26,15 +26,9 @@ namespace Microsoft.Plugin.WindowWalker.Components
/// <returns>returns the index location of each of the letters of the matches</returns> /// <returns>returns the index location of each of the letters of the matches</returns>
internal static List<int> FindBestFuzzyMatch(string text, string searchText) internal static List<int> FindBestFuzzyMatch(string text, string searchText)
{ {
if (searchText == null) ArgumentNullException.ThrowIfNull(searchText);
{
throw new ArgumentNullException(nameof(searchText));
}
if (text == null) ArgumentNullException.ThrowIfNull(text);
{
throw new ArgumentNullException(nameof(text));
}
// Using CurrentCulture since this is user facing // Using CurrentCulture since this is user facing
searchText = searchText.ToLower(CultureInfo.CurrentCulture); searchText = searchText.ToLower(CultureInfo.CurrentCulture);
@@ -86,10 +80,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
/// <returns>a list of the possible combinations that match the search text</returns> /// <returns>a list of the possible combinations that match the search text</returns>
internal static List<List<int>> GetAllMatchIndexes(bool[,] matches) internal static List<List<int>> GetAllMatchIndexes(bool[,] matches)
{ {
if (matches == null) ArgumentNullException.ThrowIfNull(matches);
{
throw new ArgumentNullException(nameof(matches));
}
List<List<int>> results = new List<List<int>>(); List<List<int>> results = new List<List<int>>();
@@ -127,10 +118,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
/// <returns>an integer representing the score</returns> /// <returns>an integer representing the score</returns>
internal static int CalculateScoreForMatches(List<int> matches) internal static int CalculateScoreForMatches(List<int> matches)
{ {
if (matches == null) ArgumentNullException.ThrowIfNull(matches);
{
throw new ArgumentNullException(nameof(matches));
}
var score = 0; var score = 0;

View File

@@ -35,10 +35,7 @@ namespace Microsoft.Plugin.WindowWalker
public List<Result> Query(Query query) public List<Result> Query(Query query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(nameof(query));
}
_cancellationTokenSource?.Cancel(); _cancellationTokenSource?.Cancel();
_cancellationTokenSource?.Dispose(); _cancellationTokenSource?.Dispose();

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{74F1B9ED-F59C-4FE7-B473-7B453E30837E}</ProjectGuid> <ProjectGuid>{74F1B9ED-F59C-4FE7-B473-7B453E30837E}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Plugin.WindowWalker</RootNamespace> <RootNamespace>Microsoft.Plugin.WindowWalker</RootNamespace>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests</RootNamespace>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> <TreatWarningsAsErrors>true</TreatWarningsAsErrors>

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<ProjectGuid>{59BD9891-3837-438A-958D-ADC7F91F6F7E}</ProjectGuid> <ProjectGuid>{59BD9891-3837-438A-958D-ADC7F91F6F7E}</ProjectGuid>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.Calculator</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.Calculator</RootNamespace>

View File

@@ -36,15 +36,9 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
/// <returns>Number translator for target culture</returns> /// <returns>Number translator for target culture</returns>
public static NumberTranslator Create(CultureInfo sourceCulture, CultureInfo targetCulture) public static NumberTranslator Create(CultureInfo sourceCulture, CultureInfo targetCulture)
{ {
if (sourceCulture == null) ArgumentNullException.ThrowIfNull(sourceCulture);
{
throw new ArgumentNullException(paramName: nameof(sourceCulture));
}
if (targetCulture == null) ArgumentNullException.ThrowIfNull(targetCulture);
{
throw new ArgumentNullException(paramName: nameof(targetCulture));
}
return new NumberTranslator(sourceCulture, targetCulture); return new NumberTranslator(sourceCulture, targetCulture);
} }

View File

@@ -2,7 +2,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<ProjectGuid>{212AD910-8488-4036-BE20-326931B75FB2}</ProjectGuid> <ProjectGuid>{212AD910-8488-4036-BE20-326931B75FB2}</ProjectGuid>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.OneNote</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.OneNote</RootNamespace>
<AssemblyName>Microsoft.PowerToys.Run.Plugin.OneNote</AssemblyName> <AssemblyName>Microsoft.PowerToys.Run.Plugin.OneNote</AssemblyName>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>

View File

@@ -3,7 +3,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows10.0.20348.0</TargetFramework> <TargetFramework>net8.0-windows10.0.20348.0</TargetFramework>
<TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion> <TargetPlatformMinVersion>10.0.19041.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion> <SupportedOSPlatformVersion>10.0.19041.0</SupportedOSPlatformVersion>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.PowerToys</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.PowerToys</RootNamespace>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
</PropertyGroup> </PropertyGroup>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.Registry</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.Registry</RootNamespace>
<AssemblyName>Microsoft.PowerToys.Run.Plugin.Registry</AssemblyName> <AssemblyName>Microsoft.PowerToys.Run.Plugin.Registry</AssemblyName>
<Version>$(Version).0</Version> <Version>$(Version).0</Version>

View File

@@ -80,15 +80,9 @@ namespace Microsoft.PowerToys.Run.Plugin.Service.Helpers
public static void ChangeStatus(ServiceResult serviceResult, Action action, IPublicAPI contextAPI) public static void ChangeStatus(ServiceResult serviceResult, Action action, IPublicAPI contextAPI)
{ {
if (serviceResult == null) ArgumentNullException.ThrowIfNull(serviceResult);
{
throw new ArgumentNullException(nameof(serviceResult));
}
if (contextAPI == null) ArgumentNullException.ThrowIfNull(contextAPI);
{
throw new ArgumentNullException(nameof(contextAPI));
}
try try
{ {
@@ -141,10 +135,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Service.Helpers
private static string GetResultSubTitle(ServiceController serviceController) private static string GetResultSubTitle(ServiceController serviceController)
{ {
if (serviceController == null) ArgumentNullException.ThrowIfNull(serviceController);
{
throw new ArgumentNullException(nameof(serviceController));
}
return $"{Resources.wox_plugin_service_status}: {GetLocalizedStatus(serviceController.Status)} - {Resources.wox_plugin_service_startup}: {GetLocalizedStartType(serviceController.StartType, serviceController.ServiceName)} - {Resources.wox_plugin_service_name}: {serviceController.ServiceName}"; return $"{Resources.wox_plugin_service_status}: {GetLocalizedStatus(serviceController.Status)} - {Resources.wox_plugin_service_startup}: {GetLocalizedStartType(serviceController.StartType, serviceController.ServiceName)} - {Resources.wox_plugin_service_name}: {serviceController.ServiceName}";
} }

View File

@@ -3,7 +3,7 @@
<Import Project="..\..\..\..\Version.props" /> <Import Project="..\..\..\..\Version.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.Service</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.Service</RootNamespace>
<AssemblyName>Microsoft.PowerToys.Run.Plugin.Service</AssemblyName> <AssemblyName>Microsoft.PowerToys.Run.Plugin.Service</AssemblyName>
<Version>$(Version).0</Version> <Version>$(Version).0</Version>

View File

@@ -19,10 +19,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Service
public ServiceResult(ServiceController serviceController) public ServiceResult(ServiceController serviceController)
{ {
if (serviceController == null) ArgumentNullException.ThrowIfNull(serviceController);
{
throw new ArgumentNullException(nameof(serviceController));
}
ServiceName = serviceController.ServiceName; ServiceName = serviceController.ServiceName;
DisplayName = serviceController.DisplayName; DisplayName = serviceController.DisplayName;

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.System.UnitTests</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.System.UnitTests</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.System</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.System</RootNamespace>
<AssemblyName>Microsoft.PowerToys.Run.Plugin.System</AssemblyName> <AssemblyName>Microsoft.PowerToys.Run.Plugin.System</AssemblyName>

View File

@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<IsPackable>false</IsPackable> <IsPackable>false</IsPackable>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests</RootNamespace>
</PropertyGroup> </PropertyGroup>

View File

@@ -65,10 +65,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeDate
public List<Result> Query(Query query) public List<Result> Query(Query query)
{ {
if (query == null) ArgumentNullException.ThrowIfNull(query);
{
throw new ArgumentNullException(paramName: nameof(query));
}
return SearchController.ExecuteSearch(query, IconTheme); return SearchController.ExecuteSearch(query, IconTheme);
} }

View File

@@ -3,7 +3,7 @@
<PropertyGroup> <PropertyGroup>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<TargetFramework>net7.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.PowerToys.Run.Plugin.TimeDate</RootNamespace> <RootNamespace>Microsoft.PowerToys.Run.Plugin.TimeDate</RootNamespace>
<AssemblyName>Microsoft.PowerToys.Run.Plugin.TimeDate</AssemblyName> <AssemblyName>Microsoft.PowerToys.Run.Plugin.TimeDate</AssemblyName>

Some files were not shown because too many files have changed in this diff Show More