Search code examples
c#botframeworkvisual-studio-macazure-bot-service

Is there a C# Bot Builder V4 SDK template for Visual Studio Mac?


I have been able to find C# Bot Builder V4 SDK templates and tutorials for Visual Studio for Windows. However, I can't find the equivalent for the Mac. There are V3 templates around for the Mac but I have seen lots of comments that indicate that V4 has breaking security changes, so I don't think that the V3 templates will work. I tried to download the template from Azure, however, it makes assumptions about the location of the .bot file. While there is documentation about how to address those in Windows, the process does not work on the Mac. Microsoft.Extensions.Configuration.UserSecrets does not add the context menus described in the documentation.

I'd like to edit, build and run locally.

Update: Here is how to use Azure Basic Bot template locally:

To run this bot locally

  • Download the bot code from the Build blade in the Azure Portal
  • Update the appsettings.json file in the root of the bot project with the botFilePath and botFileSecret
  • You can find the botFilePath and botFileSecret in the Azure App Service application settings.

Your appsettings.json file should look like this

{
    "botFilePath": "<copy value from App settings>",
    "botFileSecret": "<copy value from App settings>"
}

Run in Visual Studio: Open the .sln file with Visual Studio. Press F5.

Run in Visual Studio Code: Open the bot project folder with Visual Studio Code. Bring up a terminal. Type 'dotnet run'.

Microsoft Bot Framework Emulator is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.


Solution

  • There are no templates for Visual Studio for Mac at this time, but dotnet CLI templates are coming soon. If you feel strongly about templates for VS for Mac, please open an issue on Github so the team can prioritize.