Closed donatas-xyz closed 1 month ago
The solution was to install JsonSchema.Net
package. The JsonSchema.Net
package already comes as part of Microsoft.Teams.AI
package and it has Json.More.Net
within it, but perhaps that got corrupted somehow beyond repair after I've tried to install AdaptiveCards.Templating
package.
So in the end, I've installed JsonSchema.Net
, Json.More.Net
and Newtonsoft.Json
to the packages that already came preloaded with Teams.AI.
The complete list of packages at the moment:
<ItemGroup>
<PackageReference Include="AdaptiveCards.Templating" Version="2.0.2" />
<PackageReference Include="Json.More.Net" Version="2.0.2" />
<PackageReference Include="JsonSchema.Net" Version="7.2.1" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.22.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.7" />
<PackageReference Include="Microsoft.Graph" Version="5.56.0" />
<PackageReference Include="Microsoft.Identity.Web.TokenCache" Version="3.0.1" />
<PackageReference Include="Microsoft.Teams.AI" Version="1.5.*" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
Language
C#
Version
1.5.0
Description
Installing AdaptiveCards.Templating 2.8.2 NuGet package, that has following dependencies
for .Net Core 8 Teams App (created via MS Teams Toolkit), causes
PromptManager
to "miss" Prompts folder load with an error:
Uninstalling AdaptiveCards.Templating package resolves the issue.
I'm migrating JS Teams bot to C# one and perhaps I should be using something other than
AdaptiveCardTemplate
to populate JSON cards?UPDATE 1: Just tried installing AdaptiveCards.Templating package again, and as expected - the error comes back, when testing locally via Bot Framework Emulator. Uninstalling the package fixes the bot locally. However, no matter what I do - I cannot get rid of this error when testing the bot deployed to Azure via Teams?
UPDATE 2: After whole day's of trial and error, I've narrowed the issue down to
actions.json
andconfig.json
. This is with the AdaptiveCards.Templating package being uninstalled, which still somehow managed to wreck my Azure deployments, but works locally via Bot Framework Emulator.The issue is twofold:
actions.json
: adding anything more thanname
anddescription
causes theMethod not found: '!!0 Json.More.JsonSerializerOptionsExtensions.Read(System.Text.Json.JsonSerializerOptions, System.Text.Json.Utf8JsonReader ByRef)
error.config.json
: addingaugmentation
section causes the following error:Once again - none of it happens whilst testing via Bot Framework Emulator.
All 3 files
config.json
,actions.json
andskprompt.txt
were working fine before installing AdaptiveCards.Templating.Reproduction Steps