Muhammad Asad
Muhammad Asad

Reputation: 29

WIN UI 3 and UWP life cycle

I have created an application in WIN-UI-3 and I am trying to get UWP life cycle hooks/events in win-ui-3. Nevertheless, I am unable to find any life cycle hooks/events in it.

This is what my .csprod file looks like:

<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<RootNamespace>App3</RootNamespace>
<ApplicationManifest>app.manifest</ApplicationManifest>
<Platforms>x86;x64;arm64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
<UseWinUI>true</UseWinUI>
</PropertyGroup>



<!-- Workaround for https://github.com/dotnet/sdk/issues/17890 -->
<PropertyGroup>
<NoWarn>CA1416, $(NoWarn)</NoWarn>
</PropertyGroup>



<ItemGroup>
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>



<ItemGroup>
<PackageReference Include="Microsoft.ProjectReunion" Version="0.8.0" />
</ItemGroup>
</Project>

What I am actually trying is to create an activity monitoring application, something like hubstuff, but I do not know if I am on right path.

Upvotes: 0

Views: 424

Answers (1)

mm8
mm8

Reputation: 169200

The UWP app model is not supported in the stable production ready release of WinUI 3 that you are targeting in your project file:

<PackageReference Include="Microsoft.ProjectReunion" Version="0.8.0" />

If you install the 1.0.0-experimental1 version, there is an [Experimental] Blank App (WinUI 3 in UWP) project template that you can use to create a UWP app based on the WinUI3 library.

Note that the experimental version is not supported for use in production environments, and apps that use the experimental releases cannot be published to the Microsoft Store. Experimental features may also be removed from the next release, or may never be released at all.

Upvotes: 2

Related Questions