how can i implement bot framework in my visual studio code ,And what packages are need to be installed for the usage of bot framework in visual studio code?
This is a pretty broad question, but I'll try to cover all of the bases bases and include answers for Node/JS/TS as well as C#.
You have 4 options:
Create the bot in Azure:
[JS/TS/Node ONLY] Create the bot via Yeoman: (See JavaScript Quickstart below)
npm install -g yo generator-botbuilder
yo botbuilder
. [C# ONLY]: Use a VSIX template in Visual Studio:**
Clone a Sample:
REAMDE.md
for further instruction.Create it from scratch as @TobiasC mentioned. I highly recommend against going this route unless you know what you're doing. It is much easier to start with a sample. Using Yeoman to generate an Empty Bot is a good route to go if you want something pretty bare bones.
The required packages really varies depending on what you're going to do with your bot.
JS/TS/Node: Here's a snippet of Basic Bot's package.json
, showing all the packages it uses:
"dependencies": {
"botbuilder": "^4.2.0",
"botbuilder-ai": "^4.2.0",
"botbuilder-dialogs": "^4.2.0",
"botframework-config": "^4.2.0",
"dotenv": "^6.1.0",
"restify": "^7.2.3"
},
"devDependencies": {
"eslint": "^5.9.0",
"eslint-config-standard": "^12.0.0",
"eslint-plugin-import": "^2.14.0",
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-promise": "^4.0.1",
"eslint-plugin-standard": "^4.0.0",
"nodemon": "^1.18.6"
}
C# Here's a list of NuGet packages for Basic Bot from the .csproj
file:
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.1.1" />
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.9" />
<PackageReference Include="Microsoft.Azure.CognitiveServices.ContentModerator" Version="0.12.1-preview" />
<PackageReference Include="Microsoft.Azure.CognitiveServices.Language" Version="1.0.1-preview" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Builder.AI.Luis" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Builder.Azure" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Configuration" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.2.2" />
<PackageReference Include="Microsoft.Bot.Schema" Version="4.2.2" />
<PackageReference Include="Microsoft.Graph" Version="1.10.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta008">
Run npm start
from within the bot's directory (Node/JS/TS) or press F5 in Visual Studio (C#). By default, the bot will listen for messages at http://localhost:3978
Use the BotFramework Emulator for local testing. See "Botframework Emulator - Getting Started" below.
Really, I recommend following the docs and samples as much as possible and using the SDK Reference, when necessary. Links below.