Skip to content
Chen edited this page Mar 9, 2018 · 8 revisions

Since MSFT has started to actively develop Bot Builder SDK v4, it's suggested that you switch to the official next-generation of bot builder framework where possible.

Welcome to the BotBuilder.Standard wiki!

This repository contains my current as well as previous attempts to make Microsoft/BotBuilder work on .NET Core, which will consequently enables you to run the bots on Linux. To begin with, the repository is just a fork from Microsoft's, but later I thought it was almost impossible that I could merge my huge & dirty commits back to the official repository. So this repository is now just detached to a stand-alone one.

This repository contains unofficially ported versions of BotBuilder. By using the releases in this repository, you understand that you are at the risk of unreported bugs in the library. Still, you can help with this version by opening an issue or PR ;-)

This repository maintained by an individual who intended to make a bot out of this. Sadly, he's currently busy with his real life, which means it would be some time before he had a chance to taste the BotBuilder running on Linux. Fortunately, with the new directory structure, it's relatively easy (I hope so) to just fetch and merge from Microsoft's official master branch without almost any conflicts.

The branches

There are currently several branches in the repository, in the order of creation

  • portable [.NET Core 1.0] [Notes]: The very first attempt. Inspired by Microsoft/BotBuilder#572 and Microsoft/BotBuilder#2289. Used Newtonsoft.Json with some hacks on JsonConverter to completely dispense with binary serialization. Ported major part of the BotBuilder library. Put the ported projects beside the original ones.
  • netcore2 [.NET Core 2.0] [Notes]: Reintroduced binary serialization with some surrogate hacks that makes BinaryFormatter work with Types, Delegates, etc, taking the place of Newtonsoft.Json.
  • netcore20+net45 [.NET Core 2.0/.NET 4.5]: The latest & active branch. I copied the branch from netcore20@CXuesong/BotBuilder fork. It seems that Microsoft/BotBuilder#3472 might not be so easily merged. I remastered the polyfills to keep the original solution structure intact, while the new multi-targeted projects/solution shared most of the source files with the original ones. The basic idea is the same as netcore2 branch, but I believe this branch is more resilient to the merges from Microsoft's official reposiory.

Getting started

This following instructions apply to netcore20+net45 branch.

There is no ConfigurationManager in ASP.NET Core, so I added SettingsUtils.AttachConfiguration and you need to call it upon initialization of the website (e.g. in Startup.ConfigureServices). This change will make sure the rest of SDK can be migrated seamlessly to ASP.NET Core.

I have migrated BotAuthenticationAttribute to ASP.NET Core. Now you can place it on your controller classes the same way when you are working with ASP.NET. When used along with Bot.Builder, the invocations of UseBotAuthentication can be removed in your Startup.Configure methods. See an ASP.NET Core example for reference.

Issues

Issues and PRs are welcomed. However, before you open an issue, keep in mind that this set of packages are ported, so it could be possible that problems that appears in your application might be caused by the upstream repository. If you are not sure about this, I am glad to help in any case, but please, get prepared for some terrible delay 🙈 Again, keep in mind that I provide no guarantee on the stability of the packages, from any aspects.

Even if you are going to report the problem in Microsoft's repository, please make sure the problem can be reproduced on ASP.NET (not ASP.NET Core) with official BotBuilder packages. Thanks for your understanding.

Finally, I hope you have fun with Microsoft's Bot Framework with .NET on your favorite OS.

Clone this wiki locally