Skip to content

Commit cdf6aec

Browse files
[WCR Sample] Single dotnet run with unpackage selfcontained as example. (#447)
* Combine unpackage and selfcontain as single dotnet run command as example
1 parent a755316 commit cdf6aec

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

Diff for: Samples/WindowsCopilotRuntime/README.md

+7-12
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,12 @@ join the [Windows Insider Program](https://insider.windows.com).
3939
# Contributing to this project
4040
- Refer to the [contributing guide](./Contributing.md)
4141

42-
## Special Considerations for Debugging as an Unpackaged App in Visual Studio
43-
44-
- This project is not designed to be fully functional in an unpackaged app. However, Windows Copilot Runtime does support unpackaged app.
45-
- 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:
46-
```xml
47-
<WindowsAppSdkBootstrapInitialize>true</WindowsAppSdkBootstrapInitialize>
48-
<WindowsPackageType>None</WindowsPackageType>
49-
```
50-
- 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:
42+
## Special Considerations for Unpackaged & Self-Contained Mode with WCR
43+
44+
- This project is not intended to be fully functional when running as an unpackaged app. However, Windows Copilot Runtime (WCR) does support unpackaged apps.
45+
- Self-contained mode is fully supported by WCR APIs as well.
46+
- The following command demonstrates how to run the app as an ARM64 unpackaged application in self-contained mode (for both WinAppSDK and .NET):
5147
```powershell
52-
dotnet run -p:Configuration=Debug -p:Platform=ARM64 -p:WindowsPackageType=None -p:WindowsAppSdkBootstrapInitialize=true
48+
dotnet run -p:Configuration=Debug -p:Platform=ARM64 -p:WindowsPackageType=None -p:WindowsAppSDKSelfContained=true -p:SelfContained=true
5349
```
54-
- Self contained mode is fully supported by WCR apis.
55-
- 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.
50+
- 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.

0 commit comments

Comments
 (0)