Incompatibility with bot framework 4.2.0+
See original GitHub issueTarget Platforms
Other
SDK Version
1.4.0
Application Name
all
Problem Description
Since BF was updated to use ANTLR 4.11.1 (in 4.2.0) it is no longer possible to use new AdaptiveCardTemplate(json)
in the same project
It fails with this error:
System.TypeInitializationException: The type initializer for 'AdaptiveCardsTemplateLexer' threw an exception.
---> System.MissingMethodException: Method not found: 'Antlr4.Runtime.Atn.ATN Antlr4.Runtime.Atn.ATNDeserializer.Deserialize(Char[])'.
at AdaptiveCardsTemplateLexer..cctor()
--- End of inner exception stack trace ---
at AdaptiveCardsTemplateLexer..ctor(ICharStream input)
at AdaptiveCards.Templating.AdaptiveCardTemplate..ctor(Object jsonTemplate)
Screenshots
No response
Card JSON
Example, but all fail:
{
"type": "AdaptiveCard",
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5",
"body": [
{
"type": "TextBlock",
"text": "this doesnt work",
"wrap": true
}
]
}
Sample Code Language
C# (dotnet core)
Sample Code
I have created a repro below:
https://github.com/jamesemann/adaptive-cards-incompatibility
If you dotnet run, you will see:
❯ dotnet run
Unhandled exception. System.TypeInitializationException: The type initializer for 'AdaptiveCardsTemplateLexer' threw an exception.
---> System.MissingMethodException: Method not found: 'Antlr4.Runtime.Atn.ATN Antlr4.Runtime.Atn.ATNDeserializer.Deserialize(Char[])'.
at AdaptiveCardsTemplateLexer..cctor()
--- End of inner exception stack trace ---
at AdaptiveCardsTemplateLexer..ctor(ICharStream input)
at AdaptiveCards.Templating.AdaptiveCardTemplate..ctor(Object jsonTemplate)
at Repro.DoesItWork.Main() in C:\repos\templatingrepro\Repro\Repro\Program.cs:line 9
at Repro.DoesItWork.<Main>()
Issue Analytics
- State:
- Created 2 months ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How do I fix this error? Incompatible mod set! net.fabricmc. ...
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or...
Read more >BOT Framework Advantages of V4 over V3
The central idea here is that v4 gives you more flexibility as a developer. The new state management system allows you to choose...
Read more >What .net version is compatible with bot framework
The Microsoft Bot Framework supports .NET Framework 4.6.1 or later, and .NET Core 2.1 or later. If you are using the Bot Builder...
Read more >botframework-webchat/README.md
The Bot Framework Web Chat component is a highly-customizable web-based client for the Bot Framework V4 SDK. The Bot Framework SDK v4 enables...
Read more >Microsoft.Bot.Builder 4.20.1
Version Downloads Last updated
4.20.1 18,409 a month ago
4.20.0 24,383 3 months ago
4.19.3 102,387 6 months ago
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jamesemann,
I will update SDK to use ANTLR 4.11.1
@anna-dingler would it be possible to triage this issue please?