Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can WinFormsComInterop work with json #68

Open
duykhongphai opened this issue Oct 7, 2023 · 1 comment
Open

Can WinFormsComInterop work with json #68

duykhongphai opened this issue Oct 7, 2023 · 1 comment

Comments

@duykhongphai
Copy link

I created a winform to upload files to gg drive and got the error "Newtonsoft.Json.JsonSerializationException: Unable to find a
constructor to use for type
Google.Apis.Auth.OAuth2.GoogleClientSecrets. A class should either
have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path "installed', line 2, position 16.
at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateNewO
bject(JsonReader, JsonObjectContract, JsonProperty, JsonProperty, String, Boolean&)+0x18f
at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader, Type, JsonContract, JsonProperty, JsonContainerContract, JsonProperty, Object) + 0x2a4
at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValuel nternal(JsonReader, Type, JsonContract, JsonProperty, JsonContainerContract, JsonProperty, Object) + 0xa4
at
Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(Js
onReader, Type, Boolean)+0x257
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader, Type) + Oxf4
at Google.Apis.Json.NewtonsoftJsonSerializer.DeserializeT 0x92" when building to native code but when running directly on visual studio it's okay! Please help me

@kant2002
Copy link
Owner

kant2002 commented Oct 7, 2023

This project only helps WinForms controls to play nicely with NativeAOT. All other dependencies should be handled separately. I would suggest raising issue at Google API library https://github.com/googleapis/google-api-dotnet-client/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants