'AdaptiveCard' does not contain a definition for 'FromJson'--Microsoft Bot Framework

后端 未结 2 1258
小鲜肉
小鲜肉 2021-01-24 17:19

I have tried creating an adaptive card, parsing it from json. As mentioned in https://docs.microsoft.com/en-us/adaptive-cards/create/libraries/net#example-parse-from-json, I hav

相关标签:
2条回答
  • 2021-01-24 17:44

    Apparently the documentation is outdated. The class is named AdaptiveCard now, without the last 's'.

    So instead of:

    var parseResult = AdaptiveCards.FromJson(card);
    

    Use:

    var parseResult = AdaptiveCard.FromJson(card);
    
    0 讨论(0)
  • 2021-01-24 17:58

    As there is a Breaking changes from v0.5:

    Package renamed from Microsoft.AdaptiveCards to AdaptiveCards

    It seems that you have installed Microsoft.AdaptiveCards but AdaptiveCards.

    To install AdaptiveCards, please mark Include prerelease checkbox in NuGet package manager:

    0 讨论(0)
提交回复
热议问题