Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Feb 7, 2024

Conversation

alexlamtest
Copy link
Collaborator

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:

  • Private pipeline run with these changes succeeded.

How tested:

  • With these changes in place, loading the .sln file into VS no longer triggered the "fix this solution with Configuration Manager" error message.
  • PREFast scan of the .sln file was unblocked in the private pipeline run. 

Target Release

Ideally 1.5+. Might be ok for older releases.

Checklist

  • Samples build and run using the Visual Studio versions listed in the Windows development docs.
  • Samples build and run on all supported platforms (x64, x86, ARM64) and configurations (Debug, Release).
  • Samples set the minimum supported OS version to Windows 10 version 1809.
  • Samples build clean with no warnings or errors.
  • [For new samples]: Samples have completed the sample guidelines checklist and follow standardization/naming guidelines.
  • If I am onboarding a new feature, then I must have correctly setup a new CI pipeline for my feature with the correct triggers and path filters laid out in the "Onboarding Samples CI Pipeline for new feature" section in samples-guidelines.md.
  • I have commented on my PR /azp run SamplesCI-<FeatureName> to have the CI build run on my branch for each of my FeatureName my PR is modifying. This must be done on the latest commit on the PR before merging to ensure the build is up to date and accurate. Warning: the PR will not block automatically if this is not run due to '/azp run' limitation on triggering more than 10 pipelines.

@alexlamtest
Copy link
Collaborator Author

/azp run

Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@alexlamtest alexlamtest merged commit 046667c into main Feb 7, 2024
2 checks passed
@alexlamtest alexlamtest deleted the user/alexlam/48663282-main-20250206 branch February 7, 2024 01:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants