[#3948] Update dotnet samples to target .Net 8 - Skills samples (#3983)

* Update Skills to net 6

* Update README
This commit is contained in:
Joel Mut 2024-06-25 13:37:36 -03:00 коммит произвёл GitHub
Родитель ccd01b539e
Коммит 369186d80a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
10 изменённых файлов: 30 добавлений и 22 удалений

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Microsoft.BotBuilderSamples.EchoSkillBot</AssemblyName>
<RootNamespace>Microsoft.BotBuilderSamples.EchoSkillBot</RootNamespace>
@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
## Prerequisites
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
```bash
# determine dotnet version

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Microsoft.BotBuilderSamples.SimpleRootBot</AssemblyName>
<RootNamespace>Microsoft.BotBuilderSamples.SimpleRootBot</RootNamespace>
@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Microsoft.BotBuilderSamples.DialogRootBot</AssemblyName>
<RootNamespace>Microsoft.BotBuilderSamples.DialogRootBot</RootNamespace>
@ -17,8 +17,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Microsoft.BotBuilderSamples.DialogSkillBot</AssemblyName>
<RootNamespace>Microsoft.BotBuilderSamples.DialogSkillBot</RootNamespace>
@ -9,9 +9,9 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.Bot.Builder.AI.Luis" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.AI.Luis" Version="4.22.4" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
<PackageReference Include="Microsoft.Recognizers.Text.DataTypes.TimexExpression" Version="1.7.0" />
</ItemGroup>

Просмотреть файл

@ -6,7 +6,7 @@ This bot has been created using the [Bot Framework](https://dev.botframework.com
## Prerequisites
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
```bash
# determine dotnet version

Просмотреть файл

@ -6,7 +6,7 @@ This bot has been created using [Bot Framework](https://dev.botframework.com), i
## Prerequisites
- [.NET SDK](https://dotnet.microsoft.com/download) version 6.0
- [.NET SDK](https://dotnet.microsoft.com/download) version 8.0
```bash
# determine dotnet version

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Microsoft.BotBuilderSamples.RootBot</AssemblyName>
<RootNamespace>Microsoft.BotBuilderSamples.RootBot</RootNamespace>
@ -13,8 +13,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -74,8 +74,16 @@ namespace Microsoft.BotBuilderSamples.SSORootBot
private BotFrameworkSkill GetCallingSkill(ClaimsIdentity claimsIdentity)
{
var botAppIdClaim = claimsIdentity.Claims?.FirstOrDefault(claim => claim.Type == AuthenticationConstants.AppIdClaim);
var appId = botAppIdClaim?.Value;
var version = claimsIdentity.Claims.FirstOrDefault(claim => claim.Type == AuthenticationConstants.VersionClaim)?.Value;
var appId = claimsIdentity.Claims?.FirstOrDefault(claim =>
{
if (version == "2.0")
{
return claim.Type == AuthenticationConstants.AuthorizedParty;
}
return claim.Type == AuthenticationConstants.AppIdClaim;
})?.Value;
if (string.IsNullOrWhiteSpace(appId))
{
return null;

Просмотреть файл

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<LangVersion>latest</LangVersion>
<AssemblyName>Microsoft.BotBuilderSamples.SkillBot</AssemblyName>
<RootNamespace>Microsoft.BotBuilderSamples.SkillBot</RootNamespace>
@ -9,8 +9,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.3" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.22.4" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.22.4" />
</ItemGroup>
<ItemGroup>