Hi team,
We want to implement stars rating feedback for our bot service, and I am using the emulator to debug AdaptiveCard message but got a rendering issue:

Emulator version: 4.7.0
AdaptiveCard JSON: Card Json
Reference: https://stackoverflow.com/questions/53943396/in-microsoft-bot-framework-how-to-include-a-star-rating-feedback @tdurnford
my code:
`
public static Attachment GetSurveyCard(Activity activity)
{
string cardText = GetAdaptiveCardJson();
var card = AdaptiveCard.FromJson(cardText);
Attachment attachment = new Attachment
{
ContentType = AdaptiveCard.ContentType,
Content = card
};
return attachment;
}
public static async Task ReplyToActivityAsync(Activity activity, string message)
{
try
{
if (activity != null && !string.IsNullOrEmpty(message))
{
var replyActivity = activity.CreateReply(message);
replyActivity.AttachmentLayout = AttachmentLayoutTypes.List;
replyActivity.Attachments.Add(GetSurveyCard(activity));
MicrosoftAppCredentials.TrustServiceUrl(ServiceURL);
var connector = CreateConnectorClient(ServiceURL);
await connector.Conversations.ReplyToActivityAsync(replyActivity);
}
else
{
}
}
catch (Exception ex)
{
throw new ArgumentException(ex.Message);
}
}
private static string GetAdaptiveCardJson()
{
string jsonString = string.Empty;
using (StreamReader reader = new StreamReader($@".\SurveyStar.json"))
{
jsonString = reader.ReadToEnd();
}
return jsonString;
}
`
I checked the JSON and can find the specific type for AdaptiveCard, I don't get the root cause, could you help me?
WOW! I fixed this issue, it caused by the type for Attachment.Content, it should be AdaptiveCard.FromJson(cardText).Card instead AdaptiveCard.FromJson(cardText)
AdaptiveCard.FromJson return a type AdaptiveCardParseResult, this type has a property AdaptiveCard named Card.

Hope this can help other people.
Most helpful comment
WOW! I fixed this issue, it caused by the type for
Attachment.Content, it should beAdaptiveCard.FromJson(cardText).CardinsteadAdaptiveCard.FromJson(cardText)AdaptiveCard.FromJsonreturn a typeAdaptiveCardParseResult, this type has a propertyAdaptiveCardnamedCard.Hope this can help other people.