{"id":60,"date":"2018-07-09T02:03:00","date_gmt":"2018-07-09T02:03:00","guid":{"rendered":"https:\/\/kindsonthegenius.com\/blog\/2018\/07\/09\/build-your-first-chatbot-in-visual-studio-step-by-step\/"},"modified":"2019-02-15T17:21:05","modified_gmt":"2019-02-15T16:21:05","slug":"build-your-first-chatbot-in-visual-studio-step-by-step","status":"publish","type":"post","link":"https:\/\/kindsonthegenius.com\/blog\/build-your-first-chatbot-in-visual-studio-step-by-step\/","title":{"rendered":"Build Your First ChatBot in Visual Studio (Step by Step)"},"content":{"rendered":"<p>In this short tutorial, I would take through how to build a chatbot using Visual Studio (2015 or 2017).<br \/>\n<a href=\"https:\/\/www.youtube.com\/watch?v=9r2_uRZ2Ga4&amp;list=PLMz1vLpcJgGBVhHcGtQt48pyw7jbLbX0U\" target=\"_blank\" rel=\"noopener\">Watch my video on How to Create a Bot Application using Bot Framework here<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><b>Prerequisites<\/b><\/p>\n<ol>\n<li>Have Visual Studio Installed<\/li>\n<li>Download the Bot Application Template from this link (Skip this if you are using Visual Studio 2017)<\/li>\n<li>Download the Bot Framework Emulator from this link<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p><strong>Step 1:<\/strong> Unzip the Bot Template you donwloaded into this location:<br \/>\nC:UsersKindsonDocumentsVisual Studio 2013TemplatesProjectTemplatesVisual C#<\/p>\n<p>Note: Skip Step 1 if you are using Visual Studio 2017. Visual Studio 2017 comes with a Bot Template.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Step 2<\/strong>: Create a Bot Application in Visual Studio. You can find Bot Application as shown in Figure1<\/p>\n<p>Figure 1: Bot Application<\/p>\n<p><strong>Step 3:<\/strong> Run the Application. Click on the Run button to run the project. If you are successful, the browser window opens showing\u00a0 the url of the application. Look at Figure 2.<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/2.bp.blogspot.com\/-NNzD1fDwlz4\/W0K6zjcym9I\/AAAAAAAACDI\/wv-tjJsE100eUJNrs9_uHaSFjlAeQTyqACLcBGAs\/s1600\/Successful%2Brun%2Bof%2BBot%2BApplication%2B-%2BWeb%2BPage.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/2.bp.blogspot.com\/-NNzD1fDwlz4\/W0K6zjcym9I\/AAAAAAAACDI\/wv-tjJsE100eUJNrs9_uHaSFjlAeQTyqACLcBGAs\/s400\/Successful%2Brun%2Bof%2BBot%2BApplication%2B-%2BWeb%2BPage.jpg\" width=\"400\" height=\"233\" border=\"0\" data-original-height=\"540\" data-original-width=\"922\" \/>\u00a0<\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 2: Successful run of Bot Application<\/div>\n<p>&nbsp;<\/p>\n<p><strong>Step 4<\/strong>: Test in an Emulator: The Bot Framework Emulator simulates application like skype or any other messenger application.<br \/>\nOpen the Emulator. It opens as show in Figure 3<\/p>\n<p>&nbsp;<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/2.bp.blogspot.com\/-pFjLGep2IQ0\/W0K7u0XoVhI\/AAAAAAAACDU\/DM97Lt6lTjM5hI_eJM6TVD6cX6bLbtnigCLcBGAs\/s1600\/Bot%2BFramework%2BEmulator.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/2.bp.blogspot.com\/-pFjLGep2IQ0\/W0K7u0XoVhI\/AAAAAAAACDU\/DM97Lt6lTjM5hI_eJM6TVD6cX6bLbtnigCLcBGAs\/s320\/Bot%2BFramework%2BEmulator.jpg\" width=\"320\" height=\"200\" border=\"0\" data-original-height=\"530\" data-original-width=\"844\" \/>\u00a0<\/a><\/div>\n<div style=\"clear: both; text-align: center;\">Figure 3: Bot Framework Emulator<\/div>\n<p>&nbsp;<\/p>\n<p>Enter the messages endpoint as shown in the Figure 3. Make sure the port number matches the one on your browser.<\/p>\n<ul>\n<li>Microsoft App Id: Leave it blank<\/li>\n<li>Microsoft App Password: Leave it blank<\/li>\n<li>Locale: Leave it blank<\/li>\n<\/ul>\n<p>Click on Connect<\/p>\n<div style=\"clear: both; text-align: center;\"><a style=\"margin-left: 1em; margin-right: 1em;\" href=\"https:\/\/3.bp.blogspot.com\/-VwiqD7gH0As\/W0K_XsTb0II\/AAAAAAAACDg\/0wd4sQF7qqMjHHh0Y8WzZijvE4PD1kNFQCLcBGAs\/s1600\/Bot%2BFramework%2BEmulator2.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/3.bp.blogspot.com\/-VwiqD7gH0As\/W0K_XsTb0II\/AAAAAAAACDg\/0wd4sQF7qqMjHHh0Y8WzZijvE4PD1kNFQCLcBGAs\/s320\/Bot%2BFramework%2BEmulator2.jpg\" width=\"320\" height=\"200\" border=\"0\" data-original-height=\"530\" data-original-width=\"844\" \/><\/a><\/div>\n<p>&nbsp;<\/p>\n<p>Now you can enter a message and hurray!!! you will have a response.<\/p>\n<p>So this is how to create your First Chatbot in Visual Studio using Bot Template.<\/p>\n<p>In the next post we would talk about how to troubleshoot common errors that may occur along the line. If you received any errors, mention it in the comment box below.<\/p>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=9r2_uRZ2Ga4&amp;list=PLMz1vLpcJgGBVhHcGtQt48pyw7jbLbX0U\" target=\"_blank\" rel=\"noopener\">Watch my video on How to Create a Bot Application using Bot Framework here<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this short tutorial, I would take through how to build a chatbot using Visual Studio (2015 or 2017). Watch my video on How to &hellip; <\/p>\n","protected":false},"author":2,"featured_media":532,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[195],"tags":[],"_links":{"self":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/60"}],"collection":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/comments?post=60"}],"version-history":[{"count":3,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/60\/revisions"}],"predecessor-version":[{"id":534,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/posts\/60\/revisions\/534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media\/532"}],"wp:attachment":[{"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/media?parent=60"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/categories?post=60"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kindsonthegenius.com\/blog\/wp-json\/wp\/v2\/tags?post=60"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}