CmdPal: Cleanup warnings, part 1 (#42584)
## Summary of the Pull Request
This PR fixes several warnings in the Command Palette projects.
- _MSB4011_: `"Sdk.props" cannot be imported again. It was already
imported ...`
- Removed the `Sdk` attribute from `CoreCommonProps.props`.
- _CsWinRT1028_ – “Class should be marked partial” on
*CsWin32*-generated classes.
- Since these classes cannot be made partial, a suppression attribute
has been added.
- The `LocalKeyboardListener` type has been marked as partial.
- _Resource.resx_ – some strings had empty values.
- Updated the missing content.
- _WMC1506_ – *OneWay* bindings require at least one step to support
change notifications.
- In `SettingsWindow.xaml`, the breadcrumb binding was changed from
*OneWay* to *OneTime*, as `Crumb` does not support change notifications.
- _WMC0001_ – Unknown type in XML namespace
- In `SettingsWindow.xaml`, `FontWeight` was qualified with the CLR
namespace `Windows.UI.Text`.
<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
- [x] Related to: #42574
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx
<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
2025-10-20 18:56:55 +02:00
|
|
|
<Project>
|
2025-09-26 08:05:37 -05:00
|
|
|
<Import Project="..\..\Common.Dotnet.CsWinRT.props" />
|
|
|
|
|
<Import Project="..\..\Common.Dotnet.AotCompatibility.props" />
|
2025-07-15 12:21:44 -05:00
|
|
|
<PropertyGroup>
|
|
|
|
|
<Nullable>enable</Nullable>
|
|
|
|
|
<!-- For MVVM Toolkit Partial Properties/AOT support -->
|
|
|
|
|
<LangVersion>preview</LangVersion>
|
2025-09-26 08:05:37 -05:00
|
|
|
|
|
|
|
|
<OutputPath>$(SolutionDir)$(Platform)\$(Configuration)\WinUI3Apps\CmdPal\</OutputPath>
|
|
|
|
|
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
|
|
|
|
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
|
|
|
|
|
<!-- MRT from windows app sdk will search for a pri file with the same name of the module before defaulting to resources.pri -->
|
|
|
|
|
<ProjectPriFileName>$(RootNamespace).pri</ProjectPriFileName>
|
|
|
|
|
|
2025-07-15 12:21:44 -05:00
|
|
|
<!-- Disable SA1313 for Primary Constructor fields conflict https://learn.microsoft.com/dotnet/csharp/programming-guide/classes-and-structs/instance-constructors#primary-constructors -->
|
|
|
|
|
<NoWarn>SA1313;</NoWarn>
|
2025-09-26 08:05:37 -05:00
|
|
|
|
|
|
|
|
<ImplicitUsings>enable</ImplicitUsings>
|
2025-07-15 12:21:44 -05:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
|
<CsWinRTAotOptimizerEnabled>true</CsWinRTAotOptimizerEnabled>
|
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
2025-09-26 08:05:37 -05:00
|
|
|
<ItemGroup>
|
2025-07-15 12:21:44 -05:00
|
|
|
<PackageReference Include="Microsoft.Windows.CsWin32">
|
|
|
|
|
<PrivateAssets>all</PrivateAssets>
|
2025-09-26 08:05:37 -05:00
|
|
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
2025-07-15 12:21:44 -05:00
|
|
|
</PackageReference>
|
2025-09-26 08:05:37 -05:00
|
|
|
<PackageReference Include="Microsoft.WindowsAppSDK" />
|
|
|
|
|
<PackageReference Include="Microsoft.Web.WebView2" />
|
|
|
|
|
<!-- This line forces the WebView2 version used by Windows App SDK to be the one we expect from Directory.Packages.props . -->
|
2025-07-15 12:21:44 -05:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
|
|
|
|
<ItemGroup>
|
2025-09-26 08:05:37 -05:00
|
|
|
<ProjectReference Include="$(MSBuildThisFileDirectory)\extensionsdk\Microsoft.CommandPalette.Extensions.Toolkit\Microsoft.CommandPalette.Extensions.Toolkit.csproj" />
|
2025-07-15 12:21:44 -05:00
|
|
|
</ItemGroup>
|
|
|
|
|
|
2025-09-26 12:46:09 -05:00
|
|
|
<ItemGroup>
|
|
|
|
|
<EmbeddedResource Update="Properties\Resources.resx">
|
|
|
|
|
<Generator>PublicResXFileCodeGenerator</Generator>
|
|
|
|
|
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
|
|
|
|
</EmbeddedResource>
|
|
|
|
|
</ItemGroup>
|
|
|
|
|
|
2025-07-15 12:21:44 -05:00
|
|
|
</Project>
|