[WPF][Rendering/Templating] Renderer throws newtonsoft error
See original GitHub issuePlatform
What platform is your issue or question related to? (Delete other platforms).
- .NET WPF
Author or host
Host, trying to render a card in my own app (visual studio extension)
Version of SDK
AdaptiveCards.Rendering.Wpf -> 1.2.3 AdaptiveCards.Rendering.Wpf.Xceed -> 1.2.3 AdaptiveCards.Templating -> v0.1.0-alpha1
Details
When trying to use the designer (vnext version) its all fine, designer renders the card+template correctly. Things are not working only with WPF renderer.
Keep getting this exception: System.InvalidOperationException: ‘Current error context error is different to requested error.’ during a call to : AdaptiveCard.FromJson(cardJson).Card;
This is my code:
var transformer = new AdaptiveTransformer();
var cardJson = transformer.Transform(templateData, taskData);
AdaptiveCard card = AdaptiveCard.FromJson(cardJson).Card;
Find attached card template and the card data, data-binding works fine tho.
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (10 by maintainers)
Top GitHub Comments
Thanks for asking for that…found the issue. While looking at the transformed data i realized that one of the urls was
"text": " [undefined](https://digitalcrew.teamwork.com/people/undefined) ( Teamwork )",
In the template i accidently used $root instead of $data. Its working now after i changed that.Only weird thing is that the designer on https://vnext.adaptivecards.io/designer/ renders it just fine while the WPF one throws that error.
Tracked by #1984