0

I have upgraded to the latest version of botframework and started to get the error:

Oops, it looks like something went wrong. Error:[Error] D:\home\site\wwwroot\Dialogs\RootDialog\LG\en\RootDialog_en.lg line 15:2 - line 15:69: Error occurred when parsing expression ‘json(fromFile(’…/…/Cards/en/OnChooseIntentAdaptiveCard.json’))'. fromFile does not have an evaluator, it’s not a built-in function or a custom function.

LG code:


# AdaptiveCard
[Activity
    Attachments = ${json(AdaptiveCard.Definition())}
]



# AdaptiveCard.Definition
- ${json(fromFile('../../Cards/en/OnChooseIntentAdaptiveCard.json'))}



# chooseIntentResponseWithCard_en()
[Activity
    Attachments = ${ActivityAttachment(json(fromFile('../../Cards/en/OnChooseIntentAdaptiveCard.json')), 'adaptiveCard')}
]



# Greeting_en()
[Activity
    Attachments = ${ActivityAttachment(json(fromFile('../../Cards/en/GreetingCard.json')), 'adaptiveCard')}
    AttachmentLayout = list
]

What am I missing?

1 Answers1

1

fromFile is now disabled by default. You can change set the value on the Microsoft.Bot.Builder.LanguageGeneration.Templates class:

Templates.EnableFromFile = true;

Dana V
  • 935
  • 4
  • 10
  • Is there a changelog for botframework versions or something similar where we can follow the changes? – Aron Gabor Kelsch Dec 14 '21 at 11:04
  • 1
    You can keep an eye [here](https://github.com/Microsoft/botbuilder-dotnet/releases). You can also look at the branch commits (main or whatever version you are interested in): https://github.com/microsoft/botbuilder-dotnet/commits/4.15 – Dana V Dec 16 '21 at 18:34