A custom Cortana Bot can be developed and added pretty easily. The Bot can be used locally (local debugging), for a restricted audience (e.g.: to a specific Microsoft Account) or in public through the Microsoft App Store.
An Azure Bot is not only bound to Cortana. Cortana is just one distribution channel. Other channels would be, for instance:
- Direct Line
- Web Chat
- Facebook Messenger
- Twilio (SMS)
In addition, a bot isn’t bound to just one channel. Thus, every desired channel can be added on demand. (Probably requiring a higher configuration effort)
Login into your Azure Portal and create a Web App Bot.
Add your desired channel(s). In my case: Cortana
Click on „Edit“ to upload an icon and to add the bot to your Cortana. (Connect to Cortana) The bot magically appears in your personal cortana.
Copy and remember MicrosoftAppPassword, AzureWebJobsStorage and MicrosoftAppId which is required later on. Click on „Build“ to download a .zip of your bot. Extract the bundle and check it into a VSTS project. (If you don’t have a VSTS account, create one for free, or use GitHub/Lab instead)
Enable Continuous Integration in „Configure continuous deployment“ by selecting the repository of your choice. Once done, a commit in your repro will automatically upload the source-Code change to your online bot. Edit: For a single push, without continuous integration, right-click the project and select publish. The username + password to publish your changes can be found in Azure.
Add the MicrosoftAppId, MicrosoftAppPassword and AzureWebJobsStorage values into the Web.config file.
If you tend to add/change or update any NuGet package, remove all hard dependencies in the .csproj file. (MS did reference some files statically, instead of using directly a NuGet)
E.g.: If you plan to upgrade Microsoft.Net.Compilers, remove its dependency from the .csproj
You are now ready to develop + deploy your bot 🙂
Instead of uploading each change over and over again, a bot emulator can be used for local debugging. Create a new configuration with following setup:
Once added and configured, an entry in the Endpoint section is visible. Click the entry to open the emulator. Local communication is up and running and ready for testing.