✅ .NET MAUI System.Reflection.TargetInvocationException
Good evening, I hope you are doing well.
I have the following problem, I would like to decrypt a string with Newtonsoft, however, when I try this in the Constructor my app crashes (error) but when I try it in a RelayCommand it works but the CollectionView doesn't update.
The Code:
I´m using:
CommunityToolkit.MAUI
(latest)
CommunityToolkit.MVVM (latest)
Newton.Json (latest)
11 Replies
What error?
- I have an issue, I get an error.
Is basically what you're saying right now. Please include further information such as what the precise issue is including the error itself.
System.Reflection.TargetInvocationException when my ViewModel hits the Constructor method in following line:
But when I use the line above in an RelayCommand, there is no error, and the string gets parsed correctly. I'm trying to figure out how to use the
But when I use the line above in an RelayCommand, there is no error, and the string gets parsed correctly. I'm trying to figure out how to use the
deserialize
line on Startup.And what is the JSON string?
as well as the code of CharacterModel
You can use this $paste
If your code is too long, you can post to https://paste.mod.gg/ and copy the link into chat for others to see your shared code!
BlazeBin - onvdfttbamfo
A tool for sharing your source code with the world!
BlazeBin - onvdfttbamfo
A tool for sharing your source code with the world!
BlazeBin - onvdfttbamfo
A tool for sharing your source code with the world!
Thx for trying to helping me
Try to use System.Text.Json instead of Newtonsoft, it's also the standard today.
and faster
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.Hey, thx for your help, a made a Work around, thx for the Tipp, thx for all !!!!!