Skip to content

Commit 9723aeb

Browse files
dkbennettSantosh Chintalapatiangelazhangmsft
authored
Add DeploymentManager CSharp Sample (#96)
* Add DeploymentManager CSharp Sample * Update project to not enable signing * Edit readme and some comments * Add license information to xaml and cs files. * Update README.md * Incorporate PR feedback * Incorporating further PR feedback * update to 1.0 GA and add link from main readme Co-authored-by: Santosh Chintalapati <[email protected]> Co-authored-by: Angela Zhang <[email protected]>
1 parent dfcd094 commit 9723aeb

21 files changed

+473
-4
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@
22

33
This repository hosts samples for the [Windows App SDK](https://github.com/microsoft/WindowsAppSDK). Samples for various features shipping in the Windows App SDK will be added to this repository. For more information about the Windows App SDK, visit the [Windows App SDK Documentation](https://docs.microsoft.com/windows/apps/windows-app-sdk/). To learn more about the Windows App SDK design or to contribute to the project, make feature proposals, or start discussions, visit the [Windows App SDK GitHub page](https://github.com/microsoft/WindowsAppSDK).
44

5-
## List of samples
5+
## List of samples
66

77
#### App Lifecycle and System Services
88
- [App Lifecycle](Samples/AppLifecycle): These samples demonstrate app instancing using the AppLifecycle APIs. They include the following features:
99
- [Activation](Samples/AppLifecycle/Activation): These samples demonstrate support for rich activation kinds.
1010
- [Instancing](Samples/Applifecycle/Instancing): These samples demonstrate support for single and selective multi-instancing.
11-
- [Power Notifications](Samples/Applifecycle/StateNotifications): These samples demonstrate the power/system state notifications for managing app workload.
11+
- [Power Notifications](Samples/Applifecycle/StateNotifications): These samples demonstrate the power/system state notifications for managing app workload.
1212

1313
#### Data and Files
1414
- [Resource Management](Samples/ResourceManagement): These samples demonstrates app resource management using the MRT Core APIs.
1515

1616
#### Deployment
17+
- [Deployment Manager](Samples/DeploymentManager): This sample demonstrates how to initialize and access deployment information for the Windows App SDK runtime.
1718
- [Unpackaged](Samples/Unpackaged): These samples demonstrate auto-initialization with the Windows App SDK package from non-MSIX (unpackaged) application.
1819

1920
#### Dynamic Dependencies
@@ -23,7 +24,7 @@ This repository hosts samples for the [Windows App SDK](https://github.com/micro
2324
- [Text Rendering](Samples/TextRendering): This sample is a gallery of the DWriteCore APIs demonstrating text rendering.
2425

2526
#### User Interface and Input
26-
- [Windowing](Samples/Windowing): This sample demonstrates how to manage app windows using the Windowing APIs.
27+
- [Windowing](Samples/Windowing): This sample demonstrates how to manage app windows using the Windowing APIs.
2728
- [XAML Controls Gallery](https://github.com/microsoft/Xaml-Controls-Gallery/tree/winui3): This is a sample app that showcases all of the WinUI 3 controls in action.
2829

2930
## Requirements
@@ -33,7 +34,7 @@ Thes Windows App SDK samples have the following system requirements:
3334
- Windows 10, version 1809 (build 17763) or later.
3435

3536
- [Visual Studio 2022](https://visualstudio.microsoft.com/downloads/) or Visual Studio 2019 version 16.9 or later, with the following workloads and components:
36-
37+
3738
- Universal Windows Platform development
3839
- .NET Desktop Development (needed even if you're only building C++ Win32 apps)
3940
- Desktop development with C++ (needed even if you're only building .NET apps)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: "Deployment Manager sample"
3+
page_type: sample
4+
languages:
5+
- csharp
6+
products:
7+
- windows
8+
- windows-app-sdk
9+
description: "Shows how to use the Windows App Runtime Deployment API"
10+
urlFragment: deployment
11+
---
12+
# Deployment Manager sample
13+
14+
This sample demonstrates how to use the DeploymentManager class to ensure the WindowsAppRuntime is initialized and in a good state.
15+
16+
## Requirements
17+
C# sample requires either .NET SDK 5.0.205, .NET SDK 5.0.401, or later.
18+
19+
Before building the sample, make sure to set up your environment correctly by following the steps [here](https://docs.microsoft.com/windows/apps/windows-app-sdk/set-up-your-development-environment).
20+
21+
## Building and running any of the samples
22+
1. Open the solution file (.sln) in the subfolder of your preferred sample in Visual Studio.
23+
2. Build the solution.
24+
3. Right click on the solution and click **Deploy Solution**
25+
4. Debug the project.
26+
27+
## Related Links
28+
29+
- [Windows App SDK](https://docs.microsoft.com/windows/apps/windows-app-sdk/)
30+
- [Deployment API](https://docs.microsoft.com/windows/windows-app-sdk/api/winrt/microsoft.windows.applicationmodel.windowsappruntime.deploymentmanager)
432 Bytes
Loading
5.25 KB
Loading
1.71 KB
Loading
637 Bytes
Loading
283 Bytes
Loading
456 Bytes
Loading
2.05 KB
Loading
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
3+
<Package
4+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
5+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
6+
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
7+
IgnorableNamespaces="uap rescap">
8+
9+
<Identity
10+
Name="WindowsAppRuntime.Sample.Cs.DeploymentManager"
11+
Publisher="CN=Microsoft Corporation"
12+
Version="1.0.0.0" />
13+
14+
<Properties>
15+
<DisplayName>SampleApp (Package)</DisplayName>
16+
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
17+
<Logo>Images\StoreLogo.png</Logo>
18+
</Properties>
19+
20+
<Dependencies>
21+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
22+
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
23+
</Dependencies>
24+
25+
<Resources>
26+
<Resource Language="x-generate"/>
27+
</Resources>
28+
29+
<Applications>
30+
<Application Id="App"
31+
Executable="$targetnametoken$.exe"
32+
EntryPoint="$targetentrypoint$">
33+
<uap:VisualElements
34+
DisplayName="SampleApp (Package)"
35+
Description="SampleApp (Package)"
36+
BackgroundColor="transparent"
37+
Square150x150Logo="Images\Square150x150Logo.png"
38+
Square44x44Logo="Images\Square44x44Logo.png">
39+
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" />
40+
<uap:SplashScreen Image="Images\SplashScreen.png" />
41+
</uap:VisualElements>
42+
</Application>
43+
</Applications>
44+
45+
<Capabilities>
46+
<rescap:Capability Name="runFullTrust" />
47+
</Capabilities>
48+
</Package>

0 commit comments

Comments
 (0)