dapr / dapr/dotnet-sdk

Add support Native AOT

Open
#1,097 7 comments 7 reactions 0 assignees View on GitHub
area/client kind/enhancement
Dominant language
C#
Stars
1.2k
Forks
378
Avg merge
1d 22h
Merged PRs (30d)
5

Description

Current version sdk isn't compatible compiles to Native AOT.

```
System.InvalidOperationException: JsonSerializerOptions instance must specify a TypeInfoResolver setting before being marked as read-only.
src-gateway-1 | at System.Text.Json.ThrowHelper.ThrowInvalidOperationException_JsonSerializerOptionsNoTypeInfoResolverSpecified() + 0x27
src-gateway-1 | at System.Text.Json.JsonSerializerOptions.ConfigureForJsonSerializer() + 0x20
src-gateway-1 | at System.Text.Json.JsonSerializer.GetTypeInfo(JsonSerializerOptions, Type) + 0x2d
src-gateway-1 | at System.Text.Json.JsonSerializer.GetTypeInfo[T](JsonSerializerOptions) + 0x2b
src-gateway-1 | at System.Text.Json.JsonSerializer.SerializeToUtf8Bytes[TValue](TValue, JsonSerializerOptions) + 0x21
src-gateway-1 | at Dapr.Client.TypeConverters.ToJsonByteString[T](T, JsonSerializerOptions) + 0x16
src-gateway-1 | at Dapr.Client.DaprClientGrpc.PublishEventAsync[TData](String, String, TData, CancellationToken) + 0x5d
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.