-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Describe the bug
Modified Echo Web Bot throws exception teams connector 1.0.0 not found when 0.9.0 deployed. The MSFT echo bot was created from Azure, downloaded, and the NuGet Microsoft.Bot.Connector.Teams 0.9.0 package added. When the bot gets a REST POST to its controller it throws a FileNotFound exception saying "Could not load file or assembly 'Microsoft.Bot.Connector.Teams, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3'. The system cannot find the file specified."
SDK Version
Bot Builder AspNet.Core 4.5.3
.Net Version
Asp Net Core 2.1.1
NETCoreApp 2.1.0
Expected behavior
It is expected that MSFT infrastructure would recognize and find the 0.9.0 connector that was deployed in the project and not throw an exception that it was not found
Additional context
A POST endpoint was added to MSFT EchoBot. When POSTing to this endpoint, an exception is thrown complaining the teams connector 1.0.0 was not found. The app depends on v0.9.0 and v1.0.0 does not exist.
[Route("api")]
[HttpPost]
public async Task<IActionResult> Post([FromBody] WebServicePrompt prompt)
{
var message = Activity.CreateMessageActivity();
message.Text = "Hello! ";
var conversationParameters = new ConversationParameters
{
IsGroup = true,
ChannelData = new TeamsChannelData
{
Channel = new ChannelInfo(prompt.ChannelId),
},
Activity = (Activity)message
};
var serviceUrl = "https://smba.trafficmanager.net/amer/";
MicrosoftAppCredentials.TrustServiceUrl(serviceUrl, DateTime.Now.AddDays(7));
var account = newMicrosoftAppCredentials("X","X");
var connectorClient = new ConnectorClient(new Uri(serviceUrl), account);
var response = await connectorClient.Conversations.CreateConversationAsync(conversationParameters);
// Let the caller know proactive messages have been sent
return new ContentResult()
{
Content = $"Channel ID {prompt.ChannelId}, Response: {response.ToString()}",
ContentType = "text/html",
StatusCode = (int)HttpStatusCode.OK,
};
}
