Ошибка компилятора CS0535, при использовании каркаса ботов Azure - PullRequest
0 голосов
/ 28 июня 2018

Прежде всего я использую C # с каркасом ботов Azure, чтобы мой бот приветствовал пользователя (отправил первое сообщение), но когда я ввожу требуемый код, я получаю строку ошибок CS0535.

Это мой код C #:

private Activity HandleSystemMessage(Activity message)
{
    if (message.Type == ActivityTypes.DeleteUserData)
    {
        // Implement user deletion here
        // If we handle user deletion, return a real message
    }
    else if (message.Type == ActivityTypes.ConversationUpdate)
    {
        // Handle conversation state changes, like members being added and removed
        // Use Activity.MembersAdded and Activity.MembersRemoved and Activity.Action for info
        // Not available in all channels

        ConnectorClient connector = new ConnectorClient(new Uri(message.ServiceUrl));
        Activity reply = message.CreateReply("Hello from my simple Bot!");
        connector.Conversations.ReplyToActivityAsync(reply);
    }
    else if (message.Type == ActivityTypes.ContactRelationUpdate)
    {
        // Handle add/remove from contact lists
        // Activity.From + Activity.Action represent what happened
    }
    else if (message.Type == ActivityTypes.Typing)
    {
        // Handle knowing tha the user is typing
    }
    else if (message.Type == ActivityTypes.Ping)
    {
    }

    return null;
}

И вот ошибки, которые я получаю:

Handling .NET Web Application deployment.
MSBuild auto-detection: using msbuild version '14.0' from 'D:\Program Files (x86)\MSBuild\14.0\bin\amd64'.
All packages listed in packages.config are already installed.
Controllers\MessagesController.cs(14,120): error CS0535: 'ConnectorClient' does not implement interface member 'IConnectorClient.BaseUri' [D:\home\site\wwwroot\Microsoft.Bot.Sample.QnABot.csproj]
Controllers\MessagesController.cs(14,120): error CS0535: 'ConnectorClient' does not implement interface member 'IConnectorClient.SerializationSettings' [D:\home\site\wwwroot\Microsoft.Bot.Sample.QnABot.csproj]
Controllers\MessagesController.cs(14,120): error CS0535: 'ConnectorClient' does not implement interface member 'IConnectorClient.DeserializationSettings' [D:\home\site\wwwroot\Microsoft.Bot.Sample.QnABot.csproj]
Controllers\MessagesController.cs(14,120): error CS0535: 'ConnectorClient' does not implement interface member 'IConnectorClient.Credentials' [D:\home\site\wwwroot\Microsoft.Bot.Sample.QnABot.csproj]
Controllers\MessagesController.cs(14,120): error CS0535: 'ConnectorClient' does not implement interface member 'IConnectorClient.Attachments' [D:\home\site\wwwroot\Microsoft.Bot.Sample.QnABot.csproj]
Controllers\MessagesController.cs(14,120): error CS0535: 'ConnectorClient' does not implement interface member 'IConnectorClient.Conversations' [D:\home\site\wwwroot\Microsoft.Bot.Sample.QnABot.csproj]
Failed exitCode=1, command="D:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" "D:\home\site\wwwroot\.\Microsoft.Bot.Sample.QnABot.csproj" /nologo /verbosity:m /t:Build /p:AutoParameterizationWebConfigConnectionStrings=false;Configuration=Release;UseSharedCompilation=false /p:SolutionDir="D:\home\site\wwwroot\.\.\\"
An error has occurred during web site deployment.

Любая помощь будет принята с благодарностью

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...