You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Stripe.net's assembly size is around 1.2MB with the version I am referencing. Since I only use a small portion of the API (checkout creation, webhook events, ....), I enabled trimming on the assembly with <TrimmableAssembly Include="Stripe.net" />. With this I get an assembly of just 56KB, but with runtime exceptions when creating a checkout sesssion:
System.AggregateException: One or more errors occurred. (Property Get method was not found.)
---> System.ArgumentException: Property Get method was not found.
at object System.Reflection.RuntimePropertyInfo.GetValue(object obj, BindingFlags invokeAttr, Binder binder, object[] index, CultureInfo culture) x 2
at List<KeyValuePair<string, object>> Stripe.Infrastructure.FormEncoding.FormEncoder.FlattenParamsOptions(INestedOptions, string)
at List<KeyValuePair<string, object>> Stripe.Infrastructure.FormEncoding.FormEncoder.FlattenParamsValue(object, string)
at HttpContent Stripe.Infrastructure.FormEncoding.FormEncoder.CreateHttpContent(BaseOptions)
at HttpRequestMessage Stripe.SystemNetHttpClient.BuildRequestMessage(StripeRequest)
at async Task<(HttpResponseMessage responseMessage, int retries)> Stripe.SystemNetHttpClient.SendHttpRequest(StripeRequest, CancellationToken)
at async Task<StripeResponse> Stripe.SystemNetHttpClient.MakeRequestAsync(StripeRequest, CancellationToken)
at async Task<T> Stripe.StripeClient.RequestAsync<T>(HttpMethod, string, BaseOptions, RequestOptions, CancellationToken)
at async Task<T> Stripe.Service<TEntityReturned>.RequestAsync<T>(HttpMethod, string, BaseOptions, RequestOptions, CancellationToken)
The linker obviously removes things that are vital but only accessed via reflection.
Describe the solution you'd like
Make Stripe.net linker-friendly. This will probably require DynamicallyAccessedMembers annotations in a bunch of places.
Describe alternatives you've considered
No response
Additional context
Stripe.net 39.95.0
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Stripe.net's assembly size is around 1.2MB with the version I am referencing. Since I only use a small portion of the API (checkout creation, webhook events, ....), I enabled trimming on the assembly with
<TrimmableAssembly Include="Stripe.net" />
. With this I get an assembly of just 56KB, but with runtime exceptions when creating a checkout sesssion:The linker obviously removes things that are vital but only accessed via reflection.
Describe the solution you'd like
Make Stripe.net linker-friendly. This will probably require DynamicallyAccessedMembers annotations in a bunch of places.
Describe alternatives you've considered
No response
Additional context
Stripe.net 39.95.0
The text was updated successfully, but these errors were encountered: