Can i modify Azure Bot at VS? [closed]

旧城冷巷雨未停 提交于 2019-12-31 05:22:22

问题


I created a bot, using the Azure Bot Service and a dialog template.

Then, I downloaded the code:here zip file

Here's some of the code:

[Serializable]
public class BasicForm
{
  [Prompt("Hi! What is your {&}?")]
  public string Name { get; set; }

  [Prompt("Please select your favorite car type {||}")]
  public CarOptions Car { get; set; }

  [Prompt("Please select your favorite {&} {||}")]
  public ColorOptions Color { get; set; }

  public static IForm<BasicForm> BuildForm()
  {
    // Builds an IForm<T> based on BasicForm
    return new FormBuilder<BasicForm>().Build();
  }

  public static IFormDialog<BasicForm> BuildFormDialog(FormOptions options = FormOptions.PromptInStart)
  {
    // Generated a new FormDialog<T> based on IForm<BasicForm>
    return FormDialog.FromForm(BuildForm, options);
  }
}

But, when I open this solution in VS2015: I cannot get it to compile.

Can you help me to make a solution I download from the Azure Bot Service compile?


回答1:


The first step is install Bot Framework template for Visual Studio: https://docs.botframework.com/en-us/downloads/

Next, what I would recommend to you is create a sample bot using this VS template, then just change the code with this one you've downloaded.



来源:https://stackoverflow.com/questions/41789201/can-i-modify-azure-bot-at-vs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!