Skip to content

Latest commit

 

History

History

WindowsCopilotRuntime

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
page_type languages products name urlFragment description extendedZipContent
sample
csharp
windows
windows-app-sdk
Windows Copilot Runtime
WindowsCopilotRuntime
Shows how to use the Windows Copilot Runtime
path target
LICENSE
LICENSE

Windows Copilot Runtime Sample

An app that demonstrates how to use the Windows Copilot Runtime with WinUI.

Prerequisites

To get the latest updates to Windows and the development tools, and to help shape their development, join the Windows Insider Program.

Building and running the sample

  • Open the solution file (.sln) in Visual Studio.
  • Ensure your build configuration is set to arm64.
  • From Visual Studio, either Start Without Debugging (Ctrl+F5) or Start Debugging (F5).

Contributing to this project

Special Considerations for Debugging as an Unpackaged App in Visual Studio

  • This project is not designed to be fully functional in an unpackaged app. However, Windows Copilot Runtime does support unpackaged app.
  • To enable proper startup as an unpackaged app, you need to bootstrap the Windows App SDK either Programmatically or By adding the following configuration to the .csproj file during the build process:
 <WindowsAppSdkBootstrapInitialize>true</WindowsAppSdkBootstrapInitialize>
 <WindowsPackageType>None</WindowsPackageType>
  • Alternatively, if you are using the Developer Command Prompt for Visual Studio, you can run the app as an ARM64 version using the following command, with the bootstrap property provided:
dotnet run -p:Configuration=Debug -p:Platform=ARM64 -p:WindowsPackageType=None -p:WindowsAppSdkBootstrapInitialize=true
  • Self contained mode is fully supported by WCR apis.
  • One careful consideration while using self contained mode. The OS ACL permissions prevent it to run inside any folder in C:\Users like Downloads because WorksloadsSessionManager running as a local service, cannot load WCR dlls from that folder with default permissions. This is by security choice, by design. The two ways to solve it are a) Move the self contained folder out of C:\Users where ACLs are not too restrictive or b) provide Local Service to access the said self contained folder within C:\Users. Only affects self contained mode, it doesn't affect other config modes.