microsoft / WindowsAppSDK-Samples

Feature samples for the Windows App SDK
MIT License
721 stars 225 forks source link

Fixed 3 AppLifeCycle .sln files to unblock PREFast scanning (b#48663282, b#48663490, b#48663652) #324

Closed alexlamtest closed 8 months ago

alexlamtest commented 8 months ago

Description

Although these 3 .sln files built fine in the pipeline, they failed to build when PREFast was enabled, with error like this: 2>C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\DesktopBridge\Microsoft.DesktopBridge.targets(320,5): error MSB3779: The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "Microsoft.VCLibs.Desktop, Version=14.0". Please consider changing the targeted processor architecture of your project (in Visual Studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, x64, ARM, ARM64". [F:\_work\1\s\WindowsAppSDK-Samples\Samples\AppLifecycle\Activation\cpp\cpp-win32-packaged\CppWinMainActivationPkg\CppWinMainActivationPkg.wapproj]

In addition, when these solution files were loaded into VS, there was an error message at the top prompting the user to "fix this solution using the Configuration Manager".

These 3 .sln files are updated in this PR to match that in Samples\Notifications\Push\cpp-console-packaged, because it is a comparable sample app which did not trigger PREFast failure.

How built:

How tested:

Target Release

Ideally 1.5+. Might be ok for older releases.

Checklist

alexlamtest commented 8 months ago

/azp run

azure-pipelines[bot] commented 8 months ago
Azure Pipelines could not run because the pipeline triggers exclude this branch/path.