Skip to content

Commit f0ef791

Browse files
[#3948] Update dotnet samples to target .Net 8 - Essential samples (#3987)
* Update EchoBot, WelcomeUser, MultiTurnPromptBot, CardsBot, AdaptiveCardsBot, and SuggestedActionsBot * Handling Attachments * Handling Attachments - Update TimexExpression version * TIMEX Resolution * Complex Dialogs * State Management * Core Bot
1 parent 1b49cc5 commit f0ef791

File tree

22 files changed

+151
-161
lines changed

22 files changed

+151
-161
lines changed

samples/csharp_dotnetcore/02.echo-bot/EchoBot.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
10-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
10+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

samples/csharp_dotnetcore/02.echo-bot/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
66

77
## Prerequisites
88

9-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
9+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
1010

1111
```bash
1212
# determine dotnet version

samples/csharp_dotnetcore/03.welcome-user/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
66

77
## Prerequisites
88

9-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
9+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
1010

1111
```bash
1212
# determine dotnet version
@@ -17,9 +17,9 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
1717

1818
- Clone the repository
1919

20-
```bash
21-
git clone https://github.com/Microsoft/botbuilder-samples.git
22-
```
20+
```bash
21+
git clone https://github.com/Microsoft/botbuilder-samples.git
22+
```
2323

2424
- Run the bot from a terminal or from Visual Studio:
2525

samples/csharp_dotnetcore/03.welcome-user/WelcomeUser.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77
<ItemGroup>
88
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
9-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
9+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
1010
</ItemGroup>
1111

1212
<ItemGroup>

samples/csharp_dotnetcore/05.multi-turn-prompt/MultiTurnPromptBot.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
10-
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
11-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
10+
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
11+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

samples/csharp_dotnetcore/05.multi-turn-prompt/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Bot Framework v4 multi-turn prompt bot sample
44

5-
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to use the prompts classes included in `botbuilder-dialogs`. This bot will ask for the user's name and age, then store the responses. It demonstrates a multi-turn dialog flow using a text prompt, a number prompt, and state accessors to store and retrieve values.
5+
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to use the prompts classes included in `botbuilder-dialogs`. This bot will ask for the user's name and age, then store the responses. It demonstrates a multi-turn dialog flow using a text prompt, a number prompt, and state accessors to store and retrieve values.
66

77
## Prerequisites
88

9-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
9+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
1010

1111
```bash
1212
# determine dotnet version
@@ -17,9 +17,9 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
1717

1818
- Clone the repository
1919

20-
```bash
21-
git clone https://github.com/Microsoft/botbuilder-samples.git
22-
```
20+
```bash
21+
git clone https://github.com/Microsoft/botbuilder-samples.git
22+
```
2323

2424
- Run the bot from a terminal or from Visual Studio:
2525

samples/csharp_dotnetcore/06.using-cards/CardsBot.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
10-
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
11-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
10+
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
11+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
1212
</ItemGroup>
1313

1414
<ItemGroup>

samples/csharp_dotnetcore/06.using-cards/README.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ Bot Framework v4 using cards bot sample
44

55
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to create a bot that uses rich cards to enhance your bot design.
66

7-
87
## Prerequisites
98

10-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
9+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
1110

1211
```bash
1312
# determine dotnet version
@@ -18,9 +17,9 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
1817

1918
- Clone the repository
2019

21-
```bash
22-
git clone https://github.com/Microsoft/botbuilder-samples.git
23-
```
20+
```bash
21+
git clone https://github.com/Microsoft/botbuilder-samples.git
22+
```
2423

2524
- Run the bot from a terminal or from Visual Studio:
2625

@@ -39,7 +38,6 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
3938
- Select `CardsBot.csproj` file
4039
- Press `F5` to run the project
4140

42-
4341
## Testing the bot using Bot Framework Emulator
4442

4543
[Bot Framework Emulator](https://github.com/microsoft/botframework-emulator) is a desktop application that allows bot developers to test and debug their bots on localhost or running remotely through a tunnel.
@@ -54,7 +52,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
5452

5553
## Interacting with the bot
5654

57-
Most channels support rich content. In this sample we explore the different types of rich cards your bot may use. A key to good bot design is to send interactive media, such as Rich Cards. There are several different types of Rich Cards, which are as follows:
55+
Most channels support rich content. In this sample we explore the different types of rich cards your bot may use. A key to good bot design is to send interactive media, such as Rich Cards. There are several different types of Rich Cards, which are as follows:
5856

5957
- Animation Card
6058
- Audio Card

samples/csharp_dotnetcore/07.using-adaptive-cards/AdaptiveCardsBot.csproj

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="AdaptiveCards" Version="2.7.3" />
9+
<PackageReference Include="AdaptiveCards" Version="3.1.0" />
1010
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
11-
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
12-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
11+
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
12+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

samples/csharp_dotnetcore/07.using-adaptive-cards/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
66

77
## Prerequisites
88

9-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
9+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
1010

1111
```bash
1212
# determine dotnet version
@@ -17,9 +17,9 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
1717

1818
- Clone the repository
1919

20-
```bash
21-
git clone https://github.com/Microsoft/botbuilder-samples.git
22-
```
20+
```bash
21+
git clone https://github.com/Microsoft/botbuilder-samples.git
22+
```
2323

2424
- Run the bot from a terminal or from Visual Studio:
2525

@@ -54,7 +54,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
5454

5555
Card authors describe their content as a simple JSON object. That content can then be rendered natively inside a host application, automatically adapting to the look and feel of the host. For example, Contoso Bot can author an Adaptive Card through the Bot Framework, and when delivered to Cortana, it will look and feel like a Cortana card. When that same payload is sent to Microsoft Teams, it will look and feel like Microsoft Teams. As more host apps start to support Adaptive Cards, that same payload will automatically light up inside these applications, yet still feel entirely native to the app. Users win because everything feels familiar. Host apps win because they control the user experience. Card authors win because their content gets broader reach without any additional work.
5656

57-
The Bot Framework provides support for Adaptive Cards. See the following to learn more about Adaptive Cards.
57+
The Bot Framework provides support for Adaptive Cards. See the following to learn more about Adaptive Cards.
5858

5959
- [Adaptive card](http://adaptivecards.io)
6060
- [Send an Adaptive card](https://docs.microsoft.com/en-us/azure/bot-service/nodejs/bot-builder-nodejs-send-rich-cards?view=azure-bot-service-3.0&viewFallbackFrom=azure-bot-service-4.0#send-an-adaptive-card)

samples/csharp_dotnetcore/08.suggested-actions/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
Bot Framework v4 using adaptive cards bot sample
44

5-
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to use suggested actions. Suggested actions enable your bot to present buttons that the user can tap to provide input.
5+
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to use suggested actions. Suggested actions enable your bot to present buttons that the user can tap to provide input.
66

77
## Prerequisites
88

9-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
9+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
1010

1111
```bash
1212
# determine dotnet version
@@ -17,9 +17,9 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
1717

1818
- Clone the repository
1919

20-
```bash
21-
git clone https://github.com/Microsoft/botbuilder-samples.git
22-
```
20+
```bash
21+
git clone https://github.com/Microsoft/botbuilder-samples.git
22+
```
2323

2424
- Run the bot from a terminal or from Visual Studio:
2525

samples/csharp_dotnetcore/08.suggested-actions/SuggestedActionsBot.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
10-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
10+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
1111
</ItemGroup>
1212

1313
<ItemGroup>

samples/csharp_dotnetcore/13.core-bot/CoreBot.csproj

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

@@ -15,10 +15,10 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
18-
<PackageReference Include="Microsoft.Bot.Builder.AI.Luis" Version="4.22.3" />
19-
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
20-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
21-
<PackageReference Include="Microsoft.Recognizers.Text.DataTypes.TimexExpression" Version="1.7.0" />
18+
<PackageReference Include="Microsoft.Bot.Builder.AI.Luis" Version="4.22.4" />
19+
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
20+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
21+
<PackageReference Include="Microsoft.Recognizers.Text.DataTypes.TimexExpression" Version="1.8.8" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

samples/csharp_dotnetcore/13.core-bot/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This bot uses [LUIS](https://www.luis.ai), an AI based cognitive service, to imp
1919

2020
### Install .NET Core CLI
2121

22-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
22+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
2323

2424
```bash
2525
# determine dotnet version
@@ -42,9 +42,9 @@ Once you created the LUIS model, update `appsettings.json` with your `LuisAppId`
4242

4343
- Clone the repository
4444

45-
```bash
46-
git clone https://github.com/microsoft/botbuilder-samples.git
47-
```
45+
```bash
46+
git clone https://github.com/microsoft/botbuilder-samples.git
47+
```
4848

4949
- Run the bot from a terminal or from Visual Studio:
5050

samples/csharp_dotnetcore/15.handling-attachments/HandlingAttachmentsBot.csproj

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<LangVersion>latest</LangVersion>
66
</PropertyGroup>
77

88
<ItemGroup>
99
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
10-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
11-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
12-
<PackageReference Include="Microsoft.Recognizers.Text.DataTypes.TimexExpression" Version="1.7.0" />
10+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
11+
<PackageReference Include="Microsoft.Recognizers.Text.DataTypes.TimexExpression" Version="1.8.8" />
1312
</ItemGroup>
1413

1514
<ItemGroup>

samples/csharp_dotnetcore/15.handling-attachments/README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Bot Framework v4 handling attachments bot sample
55
This bot has been created using [Bot Framework](https://dev.botframework.com), it shows how to send outgoing attachments and how to save attachments to disk.
66

77
> **NOTE: A specific example for Microsoft Teams, demonstrating how to
8-
upload files to Teams from a bot and how to receive a file sent to a bot as an attachment, can be found in sample 6 [here](https://github.com/OfficeDev/Microsoft-Teams-Samples#bots-samples-using-the-v4-sdk)**
8+
> upload files to Teams from a bot and how to receive a file sent to a bot as an attachment, can be found in sample 6 [here](https://github.com/OfficeDev/Microsoft-Teams-Samples#bots-samples-using-the-v4-sdk)**
99
1010
## Prerequisites
1111

12-
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
12+
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
1313

1414
```bash
1515
# determine dotnet version
@@ -20,9 +20,9 @@ upload files to Teams from a bot and how to receive a file sent to a bot as an a
2020

2121
- Clone the repository
2222

23-
```bash
24-
git clone https://github.com/microsoft/botbuilder-samples.git
25-
```
23+
```bash
24+
git clone https://github.com/microsoft/botbuilder-samples.git
25+
```
2626

2727
- Run the bot from a terminal or from Visual Studio:
2828

0 commit comments

Comments
 (0)