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

Rename CppUnpackagedAppNotifications to CppAppNotifications #247

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sharath2727
Copy link

Description

Provide support for creating Packaged App Notifications Sample

Target Release

1.2

Checklist

  1. Samples built and deployed using VS2022
  2. Samples run on x64 - debug/release configuration

@@ -54,6 +54,13 @@ At the very least, that means adding an entry to describe your scenario, near th
Verify your new scenario builds (without warnings), that it works as expected and has been implemented for all flavors of the sample (C++/C#, Packaged/Unpackaged, etc.).
Go to the [WindowsAppSDK-Samples](https://github.com/microsoft/WindowsAppSDK-Samples) GitHub and follow the Contributing Guidelines (at the bottom of the readme) and submit ytour code changes for peer review.

6. **Converting the Unpackaged Sample to Packaged Sample** -
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be in it's own section.

Sample can be converted to Packaged by following the guidance: https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/single-project-msix?tabs=cpp
- **For a C++ Sample** - Set the below properties:
1. Open the vcxproj and set the AppxPackage property to true and WindowsPackageType to MSIX
3. Copy the provided sample Package.appxmanifest file under App/Resources/ to the unpackaged app solution. Note the provided manifest is only for reference modify the parameters as per the documentation:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably want to mention that they'll need to open it outside of VisualStudio: either in VSCode or some other code editor

1. Open the vcxproj and set the AppxPackage property to true and WindowsPackageType to MSIX
3. Copy the provided sample Package.appxmanifest file under App/Resources/ to the unpackaged app solution. Note the provided manifest is only for reference modify the parameters as per the documentation:
https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/notifications/app-notifications/app-notifications-quickstart?tabs=cs

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After copying the package manifest, users will have to add it to their project in visualstudio (add existing item))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and got this error when building the sample:
1>D:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(823,5): error : The BaseOutputPath/OutputPath property is not set for project 'CppUnpackagedAppNotifications.vcxproj'. Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='x64'. This error may also appear if some other project is trying to follow a project-to-project reference to this project, this project has been unloaded or is not included in the solution, and the referencing project does not build using the same or an equivalent Configuration or Platform.

- **For a C++ Sample** - Set the below properties:
1. Open the vcxproj and set the AppxPackage property to true and WindowsPackageType to MSIX
3. Copy the provided sample Package.appxmanifest file under App/Resources/ to the unpackaged app solution. Note the provided manifest is only for reference modify the parameters as per the documentation:
https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/notifications/app-notifications/app-notifications-quickstart?tabs=cs
Copy link
Contributor

@loneursid loneursid Sep 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should provide a file that works out of the box for the sample, which the provided file seems to do.

I wouldn't point them to resources they don;t need at this point. The instructions provided should just provide the simplest / minimal steps to get a packaged sample running.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants