Skip to content

Commit 0413b46

Browse files
Copilotjfversluis
andauthored
Fix misleading executable path placeholder and add schema warning note in toast/snackbar setup docs (#635)
* Initial plan * Fix YOUR-PATH-TO-EXECUTABLE placeholder and add rescap:Capability warning note Replace unclear YOUR-PATH-TO-EXECUTABLE with YOUR-PROJECT-NAME\YOUR-PROJECT-NAME.exe and add an explanation of how to determine the correct value. Also add a note that the rescap:Capability schema validation warning is safe to ignore. Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
1 parent 0b20e3f commit 0413b46

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

docs/maui/includes/toast-snackbar-setup.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Here is an example of a completed opening `<Package>` tag that has added support
7373
<!-- Register COM CLSID -->
7474
<com:Extension Category="windows.comServer">
7575
<com:ComServer>
76-
<com:ExeServer Executable="YOUR-PATH-TO-EXECUTABLE" DisplayName="$targetnametoken$" Arguments="----AppNotificationActivated:"> <!-- Example path to executable: CommunityToolkit.Maui.Sample\CommunityToolkit.Maui.Sample.exe -->
76+
<com:ExeServer Executable="YOUR-PROJECT-NAME\YOUR-PROJECT-NAME.exe" DisplayName="$targetnametoken$" Arguments="----AppNotificationActivated:">
7777
<com:Class Id="6e919706-2634-4d97-a93c-2213b2acc334" />
7878
</com:ExeServer>
7979
</com:ComServer>
@@ -82,6 +82,9 @@ Here is an example of a completed opening `<Package>` tag that has added support
8282
</Extensions>
8383
```
8484

85+
> [!IMPORTANT]
86+
> Replace `YOUR-PROJECT-NAME\YOUR-PROJECT-NAME.exe` with the path to your project's executable. The format is `{.csproj file name without extension}\{.csproj file name without extension}.exe`. For example, if your project file is `MyMauiApp.csproj`, the value would be `MyMauiApp\MyMauiApp.exe`.
87+
8588
##### Example: Completed `<Applications>` tag
8689

8790
Here is an example of a completed `<Applications>` tag that now has added support for `Snackbar`:
@@ -106,7 +109,7 @@ Here is an example of a completed `<Applications>` tag that now has added suppor
106109

107110
<com:Extension Category="windows.comServer">
108111
<com:ComServer>
109-
<com:ExeServer Executable="YOUR-PATH-TO-EXECUTABLE" DisplayName="$targetnametoken$" Arguments="----AppNotificationActivated:"> <!-- Example path to executable: CommunityToolkit.Maui.Sample\CommunityToolkit.Maui.Sample.exe -->
112+
<com:ExeServer Executable="YOUR-PROJECT-NAME\YOUR-PROJECT-NAME.exe" DisplayName="$targetnametoken$" Arguments="----AppNotificationActivated:">
110113
<com:Class Id="6e919706-2634-4d97-a93c-2213b2acc334" />
111114
</com:ExeServer>
112115
</com:ComServer>
@@ -167,7 +170,7 @@ Below is an example `Package.appxmanifest` file that has been updated to support
167170

168171
<com:Extension Category="windows.comServer">
169172
<com:ComServer>
170-
<com:ExeServer Executable="YOUR-PATH-TO-EXECUTABLE" DisplayName="$targetnametoken$" Arguments="----AppNotificationActivated:"> <!-- Example path to executable: CommunityToolkit.Maui.Sample\CommunityToolkit.Maui.Sample.exe -->
173+
<com:ExeServer Executable="YOUR-PROJECT-NAME\YOUR-PROJECT-NAME.exe" DisplayName="$targetnametoken$" Arguments="----AppNotificationActivated:">
171174
<com:Class Id="6e919706-2634-4d97-a93c-2213b2acc334" />
172175
</com:ExeServer>
173176
</com:ComServer>
@@ -184,6 +187,9 @@ Below is an example `Package.appxmanifest` file that has been updated to support
184187
</Package>
185188
```
186189

190+
> [!NOTE]
191+
> You may see a schema validation warning in Visual Studio about `rescap:Capability` being an invalid child element of `Capabilities`. This warning can be safely ignoredthe `rescap:Capability` element is correct and required for the app to run with full trust.
192+
187193
For more information on handling activation: [Send a local toast notification from C# apps](/windows/apps/design/shell/tiles-and-notifications/send-local-toast?tabs=uwp#step-3-handling-activation)
188194

189195
### [Tizen](#tab/tizen)

0 commit comments

Comments
 (0)