dotnet / dotnet/android

[nativeaot] RuntimeHostConfigurationOption set in Tasks aren't included in AppContext during runtime

Open
#10,137 1 comment 1 reaction 1 assignee Claimed by @jonathanpeppers View on GitHub
Area: App+Library Build
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 19h
Merged PRs (30d)
252

Description

### Android framework version

net10.0-android (Preview)

### Affected platform version

Main as of 288f107171a8ac0c9c62dc47af5632702598aaa5

### Description

Building a native aot android project with a task that sets RuntimeHostConfigurationOption will not have the options set in AppContext during runtime. A task like this will run fine and shows in binlogs, but the values aren't available at runtime
```





```

### Steps to Reproduce

1. Build and run https://github.com/emmauss/AndroidNativeAOTTest/tree/task_test
2. When app launches, the follow should show in the button text: "Hello. Task Var:A", but instead, it shows "Hello. Task Var:", with no "A".
3. You can test with mono by disabling "PublishAot" in project properties.

### Did you find any workaround?

_No response_

### Relevant log output

```shell

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.