I had created a bot with v3 (C#) SDK and the welcome message used to work just fine without any sweat. And it still does for me in production. The code is handled in HandleS
In v4 of the Bot Framework SDK this functionality is handled by making your bot class inherit from the ActivityHandler class then overriding the OnMembersAddedAsync method.
How this looks in practice is:
...
public class MyBot : ActivityHandler
{
...
protected override async Task OnMembersAddedAsync(IList membersAdded, ITurnContext turnContext, CancellationToken cancellationToken)
{
foreach (var member in membersAdded)
{
// Greet anyone that was not the target (recipient) of this message.
if (member.Id != turnContext.Activity.Recipient.Id)
{
var welcomeMessage = "Hello and welcome!";
await turnContext.SendActivityAsync(welcomeMessage, cancellationToken);
}
}
}
...
}
There are examples of how to do this here, here, and here.
You may have to update the version of the Microsoft.Bot.Builder package that you are using.