After upgrading to bot version v3.8 and installing adaptive cards from Nuget package manager, i build my bot solution. Everything works fine but when i use ngrok to make my local address public, i'm getting an error :
Could not load file or assembly 'AdaptiveCards.Html' or one of its dependencies. Strong name signature could not be verified. The assembly may have been tampered with, or it was delay signed but not fully signed with the correct private key. (Exception from HRESULT: 0x80131045)
Code :
AdaptiveCard card = new AdaptiveCard();
card.Speak = "hellooooooo";
card.Body.Add(new TextBlock()
{
Text = "Adaptive Card design session",
Size = TextSize.Large,
Weight = TextWeight.Bolder
});
// Add text to the card.
card.Body.Add(new TextBlock()
{
Text = "Conf Room 112/3377 (10)"
});
// Add text to the card.
card.Body.Add(new TextBlock()
{
Text = "12:30 PM - 1:30 PM"
});
// Add list of choices to the card.
card.Body.Add(new ChoiceSet()
{
Id = "snooze",
Style = ChoiceInputStyle.Compact,
Choices = new List<Choice>()
{
new Choice() { Title = "5 minutes", Value = "5", IsSelected = true },
new Choice() { Title = "15 minutes", Value = "15" },
new Choice() { Title = "30 minutes", Value = "30" }
}
});
// Add buttons to the card.
card.Actions.Add(new HttpAction()
{
Url = "http://foo.com",
Title = "Snooze"
});
card.Actions.Add(new HttpAction()
{
Url = "http://foo.com",
Title = "I'll be late"
});
card.Actions.Add(new HttpAction()
{
Url = "http://foo.com",
Title = "Dismiss"
});
// Create the attachment.
Attachment attachment = new Attachment()
{
ContentType = AdaptiveCard.ContentType,
Content = card
};
message.Attachments.Add(attachment);
await context.PostAsync(message);
Are you using .NET Standard and did you upgrade?
We just published a new version of the package which dropped the .NET Standard requirement from 1.6 to 1.3. I am wondering if there is a messed up binding redirect. You might try uninstalling and then re-installing.
User contributions licensed under CC BY-SA 3.0