机器人框架中的任务模块不支持 AdaptiveNumberInput 吗?

Is AdaptiveNumberInput not supported in Task-Module in bot framework?

我正在使用任务模块来显示自适应卡片,其中包含 AdaptiveNumberInput 和其他 AdaptiveTextBlocks。 打开任务模块时,它会抛出错误 "The bot did not respond correctly to the invoke request.",当我在控制台中看到它是:"Error when processing invoke response: P…is incorrect, field is in the wrong format: value"。当我用 AdaptiveTextInput 替换它时,它发现,在这里我需要将用户的输入作为数字输入。 所以我需要 AdaptiveNumberInput。 我的代码如下-

AdaptiveCard card = new AdaptiveCard("1.0");
var body = new List<AdaptiveElement>();
var mainContainer = new AdaptiveContainer();

#region Textboxes

var container2 = new AdaptiveContainer();
for (int j = 0; j < projects.Count; j++)
{
    var columnSetWbse = new AdaptiveColumnSet();
    for (int i = 0; i < loop; i++)//Loop for no of days
    {
        var columnWbseinput = new AdaptiveColumn();
        AdaptiveNumberInput wbseInput = new AdaptiveNumberInput()
        {
            Id = "nos" + i + "-" + j,
            Min = 0,
            Max = 2,
            Placeholder = "number"
        };

        //AdaptiveTextInput wbseInput = new AdaptiveTextInput()
        //{ 
        //   MaxLength=2
        //};

        columnWbseinput.Items.Add(wbseInput);
        columnSetWbse.Columns.Add(columnWbseinput);
    }

    container2.Items.Add(columnSetWbse);
}

mainContainer.Items.Add(container2);

// mainContainer.Items.Add(container2);
#endregion

body.Add(mainContainer);

尝试在任务模块中实现它

附件附件;

实际上它应该适用于两种类型的文本输入,不确定这里的问题是什么。

因为在AdaptiveNumberInput中我们要给初始值。 请找到下面的代码-

AdaptiveNumberInput wbseInput = new AdaptiveNumberInput()
{
  Id = "nos" + i + "-" + j,
  Min = 0,
  Max = 2,        
  Value=0
};