Billdr
Billdr

Reputation: 1579

Error when following FormFlow tutorial

I'm following the FormFlow tutorial at http://docs.botframework.com/sdkreference/csharp/forms.html#simpleSandwichBot. Everything's going fine, until I attempt to add

OnCompletionAsyncDelegate<SandwichOrder> processOrder = async (context, state) =>
        {
            await context.PostAsync("We are currently processing your sandwich. We will message you the status.");
        };

I get the following error: CS1503: Argument 1: cannot convert from 'string' to 'Microsoft.Bot.Connector.Message.'

It seems I need to roll my own message, but the tutorial has not gone over rolling a new message inside a pending conversation. I fiddled around with the context and state objects, but neither seems to hold the appropriate methods.

I'll look into a solution and post back if I find one. I'm hoping Microsoft sees this and does another pass on their example app and maybe clear up a few typos while they're at it ("As described in th (sic) help").

Upvotes: 0

Views: 205

Answers (1)

Ian Boggs
Ian Boggs

Reputation: 542

Try the following

Message reply = context.MakeMessage();

reply.Text = "We are currently processing your sandwich. We will message you the status.";

await context.PostAsync(reply);

Upvotes: 1

Related Questions