Articles → MICROSOFT BOT FRAMEWORK → Create Your First Bot With Microsoft Bot Framework

Create Your First Bot With Microsoft Bot Framework






What Is A Bot Framework?





Setting Up The Bot Environment




  1. Install visual studio (if not installed on your system). I have installed visual studio 2019 on my machine.
  2. Download the file "BotFramework-Emulator-main.zip" (you can download it from the link provided by the end of this article) and copy it on the following path.
  3. C:\Users\<user_name>\Documents\Visual Studio 2019\Templates\ProjectTemplates\Visual C#


  4. Download the emulator from the following link - https://github.com/Microsoft/BotFramework-Emulator/releases/tag/v4.5.2
  5. Picture showing the bot framework setup file download link for windows
    Click to Enlarge

  6. Once the setup is downloaded, install the emulator.
  7. To show the Microsoft Bot Framework template in the visual studio, download vsix file of "Bot Framework v4 SDK Templates for Visual Studio" from visual studio marketplace
  8. Picture showing the download button for downloading Bot Framework v4 SDK Templates for Visual Studio vsix file
    Click to Enlarge




Create Your First Project




  1. Click on the "New" → "Project…"
  2. A popup window will appear where you can select the project type. Select the project type as "Bot Application".
  3. Picture showing selecting the Bot Framework project type from the visual studio project template
    Click to Enlarge

  4. Once the project is created, click on the option "Manage NuGet Packages..."
  5. Once the NuGet window will open. This message will appear - "Some NuGet packages are missing from this solution. Click to restore from your online package sources". Click on the "Restore" button.
  6. Picture showing the nuget package screen for installing the nuget packages
    Click to Enlarge





Run The Bot




  1. Run the Bot application. You will get the following first screen.
  2. Picture showing the endpoint of the bot service on the browser
    Click to Enlarge

  3. Change the URL from http://localhost:3979/ to http://localhost:3979/api/messages
  4. Following screen will come.
  5. Picture showing the endpoint of the bot service on the browser with messages controller
    Click to Enlarge

  6. Now open the bot emulator. Go to File Open Bot.
  7. A pop up window will come.
  8. Picture showing a window to connect to the bot service endpoint
    Click to Enlarge

  9. Enter the "Bot URL" as http://localhost:3979/api/messages and click on the "Connect" button.
  10. Your chat window will appear. Enter the text "hi" and you will get the following output.
  11. Picture showing the output of the first chatbot
    Click to Enlarge



Download Botframework-Emulator-Main.Zip



Download



Posted By  -  Karan Gupta
 
Posted On  -  Monday, October 12, 2020
 
Updated On  -  Monday, August 16, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250