From 5380b477a520d3e67529d893f584f02d9f2d40f1 Mon Sep 17 00:00:00 2001 From: Yu Leng <42196638+moooyo@users.noreply.github.com> Date: Wed, 23 Jul 2025 18:12:26 +0800 Subject: [PATCH] Fix cmdpal unit tests build issue (#40765) ## Summary of the Pull Request ## PR Checklist - [ ] **Closes:** #xxx - [ ] **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 ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --------- Co-authored-by: Yu Leng (from Dev Box) Co-authored-by: leileizhang --- .../Microsoft.CmdPal.Ext.Registry.csproj | 6 ------ .../Properties/AssemblyInfo.cs | 7 +++++++ .../Microsoft.CmdPal.Ext.System.csproj | 5 ----- .../Microsoft.CmdPal.Ext.System/Properties/AssemblyInfo.cs | 7 +++++++ .../Microsoft.CmdPal.Ext.TimeDate.csproj | 6 ------ .../Properties/AssemblyInfo.cs | 7 +++++++ .../Microsoft.CmdPal.Ext.WindowWalker.csproj | 5 ----- .../Properties/AssemblyInfo.cs | 7 +++++++ src/modules/powerrename/testapp/PowerRenameTest.vcxproj | 5 ++++- 9 files changed, 32 insertions(+), 23 deletions(-) create mode 100644 src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Properties/AssemblyInfo.cs create mode 100644 src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Properties/AssemblyInfo.cs create mode 100644 src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Properties/AssemblyInfo.cs create mode 100644 src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Properties/AssemblyInfo.cs diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Microsoft.CmdPal.Ext.Registry.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Microsoft.CmdPal.Ext.Registry.csproj index c5b6706f38..172ad53cad 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Microsoft.CmdPal.Ext.Registry.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Microsoft.CmdPal.Ext.Registry.csproj @@ -11,12 +11,6 @@ Microsoft.CmdPal.Ext.Registry.pri - - - <_Parameter1>Microsoft.CmdPal.Ext.Registry.UnitTests - - - diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Properties/AssemblyInfo.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..25f72ca88b --- /dev/null +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.Registry/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.CmdPal.Ext.Registry.UnitTests")] diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Microsoft.CmdPal.Ext.System.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Microsoft.CmdPal.Ext.System.csproj index 76b9caaf72..48e9d6ba82 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Microsoft.CmdPal.Ext.System.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Microsoft.CmdPal.Ext.System.csproj @@ -33,9 +33,4 @@ Microsoft.CmdPal.Ext.System - - - <_Parameter1>Microsoft.CmdPal.Ext.System.UnitTests - - diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Properties/AssemblyInfo.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..1de8abc6de --- /dev/null +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.System/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.CmdPal.Ext.System.UnitTests")] diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj index 0ef0592067..44ebab07ae 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Microsoft.CmdPal.Ext.TimeDate.csproj @@ -11,12 +11,6 @@ Microsoft.CmdPal.Ext.TimeDate.pri - - - <_Parameter1>Microsoft.CmdPal.Ext.TimeDate.UnitTests - - - Resources.Designer.cs diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Properties/AssemblyInfo.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..1f571c145a --- /dev/null +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.TimeDate/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.CmdPal.Ext.TimeDate.UnitTests")] diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj index dd07caa9d1..4da6458258 100644 --- a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Microsoft.CmdPal.Ext.WindowWalker.csproj @@ -46,9 +46,4 @@ PreserveNewest - - - <_Parameter1>Microsoft.CmdPal.Ext.WindowWalker.UnitTests - - diff --git a/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Properties/AssemblyInfo.cs b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..54807d07a7 --- /dev/null +++ b/src/modules/cmdpal/ext/Microsoft.CmdPal.Ext.WindowWalker/Properties/AssemblyInfo.cs @@ -0,0 +1,7 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Microsoft.CmdPal.Ext.WindowWalker.UnitTests")] diff --git a/src/modules/powerrename/testapp/PowerRenameTest.vcxproj b/src/modules/powerrename/testapp/PowerRenameTest.vcxproj index ce2795710a..27d6cffab8 100644 --- a/src/modules/powerrename/testapp/PowerRenameTest.vcxproj +++ b/src/modules/powerrename/testapp/PowerRenameTest.vcxproj @@ -32,7 +32,7 @@ WIN32;_WINDOWS;%(PreprocessorDefinitions) - $(OutDir)\..\..\WinUI3Apps\PowerRenameLib.lib;Pathcch.lib;comctl32.lib;shlwapi.lib;shcore.lib;%(AdditionalDependencies) + Pathcch.lib;comctl32.lib;shlwapi.lib;shcore.lib;%(AdditionalDependencies) @@ -60,6 +60,9 @@ {98537082-0fdb-40de-abd8-0dc5a4269bab} + + {51920f1f-c28c-4adf-8660-4238766796c2} +