Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions BotProject/Templates/CSharp/BotProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.1" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.ApplicationInsights" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Azure" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Debugging" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Declarative" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.ApplicationInsights.Core" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.LanguageGeneration.Renderer" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.ApplicationInsights" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Azure" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Debugging" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Declarative" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.ApplicationInsights.Core" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.6.0-preview-191012-1" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should update the package source in NuGet.config

<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
</ItemGroup>
<ItemGroup>
Expand Down
12 changes: 8 additions & 4 deletions BotProject/Templates/CSharp/ComposerBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@
using Microsoft.Bot.Builder.Dialogs.Debugging;
using Microsoft.Bot.Builder.Dialogs.Declarative;
using Microsoft.Bot.Builder.Dialogs.Declarative.Resources;
using Microsoft.Bot.Builder.Dialogs.Debugging;
using Microsoft.Bot.Builder.LanguageGeneration;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Configuration;
using Microsoft.Recognizers.Text;
using Newtonsoft.Json;
using Microsoft.Bot.Builder.AI.QnA;


namespace Microsoft.Bot.Builder.ComposerBot.json
Expand All @@ -28,27 +31,28 @@ public class ComposerBot : ActivityHandler
private DialogManager dialogManager;
private ConversationState conversationState;
private IStatePropertyAccessor<DialogState> dialogState;
private Source.IRegistry registry;
private ISourceMap sourceMap;
private string rootDialogFile { get; set; }
private IBotTelemetryClient telemetryClient;

public ComposerBot(string rootDialogFile, ConversationState conversationState, UserState userState, ResourceExplorer resourceExplorer, Source.IRegistry registry, IBotTelemetryClient telemetryClient)
public ComposerBot(string rootDialogFile, ConversationState conversationState, UserState userState, ResourceExplorer resourceExplorer, ISourceMap sourceMap, IBotTelemetryClient telemetryClient)
{
this.conversationState = conversationState;
this.userState = userState;
this.dialogState = conversationState.CreateProperty<DialogState>("DialogState");
this.registry = registry;
this.sourceMap = sourceMap;
this.resourceExplorer = resourceExplorer;
this.rootDialogFile = rootDialogFile;
this.telemetryClient = telemetryClient;
DeclarativeTypeLoader.AddComponent(new QnAMakerComponentRegistration());

LoadRootDialogAsync();
}

private void LoadRootDialogAsync()
{
var rootFile = resourceExplorer.GetResource(rootDialogFile);
rootDialog = DeclarativeTypeLoader.Load<AdaptiveDialog>(rootFile, resourceExplorer, registry);
rootDialog = DeclarativeTypeLoader.Load<AdaptiveDialog>(rootFile, resourceExplorer, sourceMap);
this.dialogManager = new DialogManager(rootDialog);
}

Expand Down
2 changes: 1 addition & 1 deletion BotProject/Templates/CSharp/NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="botbuilder.myget.org" value="https://botbuilder.myget.org/F/botbuilder-declarative/api/v3/index.json" protocolVersion="3" />
<add key="BotBuilder.myget.org" value="https://botbuilder.myget.org/F/botbuilder-v4-dotnet-daily/api/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Loading