Skip to content

Add support for .NET 9.0 #6887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)BotBuilder-DotNet.ruleset</CodeAnalysisRuleSet>
<RunSettingsFilePath>$(MSBuildThisFileDirectory)\CodeCoverage.runsettings</RunSettingsFilePath>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" PrivateAssets="all" />
</ItemGroup>

<PropertyGroup>
<Company>Microsoft</Company>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<IsPackable>false</IsPackable>
<Configurations>Debug;Release;</Configurations>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion build/onebranch/ci-api-validation-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download BotBuilderDLLs from Artifacts'
inputs:
artifactName: 'BotBuilderDLLs-Debug-Windows-net8'
artifactName: 'BotBuilderDLLs-Debug-Windows-net9'
targetPath: '$(System.ArtifactsDirectory)/OutputDlls'

- task: DownloadPipelineArtifact@2
Expand Down
18 changes: 9 additions & 9 deletions build/onebranch/ci-test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ steps:
customCommand: 'install -g @microsoft/botframework-cli@next'

- task: UseDotNet@2
displayName: "Install .NET Core 6.0"
displayName: "Install .NET Core 8.0"
continueOnError: true
inputs:
packageType: "sdk"
version: 6.x
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net6'))
version: 8.x
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))

- task: DotNetCoreCLI@2
displayName: 'dotnet test (release) 6.0'
displayName: 'dotnet test (release) 8.0'
inputs:
command: test
projects: |
Tests/**/*Tests.csproj

arguments: '-v n -f net6.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net6'))
arguments: '-v n -f net8.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))

- task: DotNetCoreCLI@2
displayName: 'dotnet test (release) 8.0'
displayName: 'dotnet test (release) 9.0'
inputs:
command: test
projects: |
Tests/**/*Tests.csproj

arguments: '-v n -f net8.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))
arguments: '-v n -f net9.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net9'))

- powershell: |
# This task copies the code coverage file created by dotnet test into a well known location. In all
Expand Down
16 changes: 8 additions & 8 deletions build/onebranch/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,34 @@ variables:
stages:
- stage: Build
jobs:
- job: Debug_Windows_Configuration_6
- job: Debug_Windows_Configuration_8
variables:
BuildConfiguration: Debug-Windows
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
steps:
- template: ci-build-steps.yml
- template: ci-test-steps.yml
- template: ci-component-detection-steps.yml
- job: Debug_Windows_Configuration_8
- job: Debug_Windows_Configuration_9
variables:
BuildConfiguration: Debug-Windows
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
steps:
- template: ci-build-steps.yml
- template: ci-test-steps.yml
- template: ci-component-detection-steps.yml
- job: Release_Windows_Configuration_6
- job: Release_Windows_Configuration_8
variables:
BuildConfiguration: Release-Windows
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
steps:
- template: ci-build-steps.yml
- template: ci-test-steps.yml
- template: ci-component-detection-steps.yml
- job: Release_Windows_Configuration_8
- job: Release_Windows_Configuration_9
variables:
BuildConfiguration: Release-Windows
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
PublishCoverage: true
steps:
- template: ci-build-steps.yml
Expand Down
8 changes: 4 additions & 4 deletions build/yaml/botbuilder-dotnet-ci-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ variables:
steps:
# Note: Template ci-build-steps.yml is not supported in macOS because it calls VSBuild@1 in order to build the Windows-only ASP.NET Desktop assemblies.
- task: UseDotNet@2
displayName: 'Use .Net sdk 6.0'
displayName: 'Use .Net sdk 8.0'
inputs:
version: 6.0.x
version: 8.0.x

- task: UseDotNet@2
displayName: 'Use .Net sdk 8.0'
displayName: 'Use .Net sdk 9.0'
inputs:
version: 8.0.x
version: 9.0.x

- powershell: 'gci env:* | sort-object name | Format-Table -AutoSize -Wrap'
displayName: 'Display env vars'
Expand Down
16 changes: 8 additions & 8 deletions build/yaml/botbuilder-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,31 +42,31 @@ variables:
stages:
- stage: Build
jobs:
- job: Debug_Windows_Configuration_6
- job: Debug_Windows_Configuration_8
variables:
BuildConfiguration: Debug-Windows
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
steps:
- template: ci-build-steps.yml
- template: ci-test-steps.yml
- job: Debug_Windows_Configuration_8
- job: Debug_Windows_Configuration_9
variables:
BuildConfiguration: Debug-Windows
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
steps:
- template: ci-build-steps.yml
- template: ci-test-steps.yml
- job: Release_Windows_Configuration_6
- job: Release_Windows_Configuration_8
variables:
BuildConfiguration: Release-Windows
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
steps:
- template: ci-build-steps.yml
- template: ci-test-steps.yml
- job: Release_Windows_Configuration_8
- job: Release_Windows_Configuration_9
variables:
BuildConfiguration: Release-Windows
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
PublishCoverage: true
steps:
- template: ci-build-steps.yml
Expand Down
2 changes: 1 addition & 1 deletion build/yaml/ci-api-validation-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ steps:
- task: DownloadPipelineArtifact@2
displayName: 'Download BotBuilderDLLs from Artifacts'
inputs:
artifactName: 'BotBuilderDLLs-Debug-Windows-net8'
artifactName: 'BotBuilderDLLs-Debug-Windows-net9'
targetPath: '$(System.ArtifactsDirectory)/OutputDlls'

- task: DownloadPipelineArtifact@2
Expand Down
18 changes: 9 additions & 9 deletions build/yaml/ci-test-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,32 @@ steps:
customCommand: 'install -g @microsoft/botframework-cli@next'

- task: UseDotNet@2
displayName: "Install .NET Core 6.0"
displayName: "Install .NET Core 8.0"
continueOnError: true
inputs:
packageType: "sdk"
version: 6.x
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net6'))
version: 8.x
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))

- task: DotNetCoreCLI@2
displayName: 'dotnet test (release) 6.0'
displayName: 'dotnet test (release) 8.0'
inputs:
command: test
projects: |
Tests/**/*Tests.csproj

arguments: '-v n -f net6.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net6'))
arguments: '-v n -f net8.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))

- task: DotNetCoreCLI@2
displayName: 'dotnet test (release) 8.0'
displayName: 'dotnet test (release) 9.0'
inputs:
command: test
projects: |
Tests/**/*Tests.csproj

arguments: '-v n -f net8.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))
arguments: '-v n -f net9.0 --configuration release --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests" --collect:"Code Coverage" --settings $(Build.SourcesDirectory)\CodeCoverage.runsettings'
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net9'))

- powershell: |
# This task copies the code coverage file created by dotnet test into a well known location. In all
Expand Down
2 changes: 1 addition & 1 deletion build/yaml/functional-test-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ steps:
command: publish
publishWebProjects: false
projects: '$(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\Microsoft.Bot.Builder.TestBot.csproj'
arguments: '-r linux-x64 --output $(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\PublishedBot --configuration $(TestConfiguration) --framework net8.0'
arguments: '-r linux-x64 --output $(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\PublishedBot --configuration $(TestConfiguration) --framework net9.0'

- task: CopyFiles@2
displayName: 'Copy root Directory.Build.props to staging'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<Version Condition=" '$(ReleasePackageVersion)' == '' ">$(LocalPackageVersion)</Version>
<Version Condition=" '$(ReleasePackageVersion)' != '' ">$(ReleasePackageVersion)</Version>
<PackageVersion Condition=" '$(ReleasePackageVersion)' == '' ">$(LocalPackageVersion)</PackageVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<PackageId>Microsoft.Bot.Builder.Dialogs.Adaptive.Runtime</PackageId>
<Description>Library for building Adaptive Runtime bots using the Bot Framework SDK</Description>
<Summary>Library for building Adaptive Runtime bots using the Bot Framework SDK</Summary>
Expand All @@ -22,11 +22,7 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<PackageId>Microsoft.Bot.Streaming</PackageId>
<Description>Streaming library for the Bot Framework SDK</Description>
<Summary>Streaming library for the Bot Framework SDK</Summary>
Expand All @@ -30,11 +30,7 @@
<PackageReference Include="Microsoft.Net.Http.Headers" Version="2.1.0" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<PackageId>Microsoft.Bot.Builder.Integration.ApplicationInsights.Core</PackageId>
<Description>This library integrates the Microsoft Bot Builder SDK with Application Insights.</Description>
<Summary>This library provides integration between the Microsoft Bot Builder SDK and Application Insights.</Summary>
Expand All @@ -20,15 +20,7 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<!-- Force Microsoft.AspNetCore.Http to a safe version. -->
<PackageReference Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</PropertyGroup>

<PropertyGroup>
<TargetFrameworks>netstandard2.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;net8.0;net9.0</TargetFrameworks>
<Description>This library integrates the Microsoft Bot Builder SDK with ASP.NET Core. It offers idiomatic configuration APIs in addition to providing all the plumbing to direct incoming bot messages to a configured bot.</Description>
<Summary>This library provides integration between the Microsoft Bot Builder SDK and ASP.NET Core.</Summary>
</PropertyGroup>
Expand All @@ -19,11 +19,7 @@
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net9.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>594af4a1-e396-4609-8198-d665eb0c1f78</UserSecretsId>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<UserSecretsId>dae2bae8-b3c8-4b83-8b3c-4022669c7a20</UserSecretsId>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework Condition="'$(BuildTarget)' == 'net6'">net6.0</TargetFramework>
<TargetFramework Condition="'$(BuildTarget)' == 'net8'">net8.0</TargetFramework>
<TargetFrameworks Condition="'$(BuildTarget)' == ''">net6.0;net8.0</TargetFrameworks>
<TargetFramework Condition="'$(BuildTarget)' == 'net9'">net9.0</TargetFramework>
<TargetFrameworks Condition="'$(BuildTarget)' == ''">net8.0;net9.0</TargetFrameworks>

<IsPackable>false</IsPackable>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<!-- The SlackAPI package isn't signed, so supress the warning. There seems to not be a way to supress this for ONLY SlackAPI. -->
<NoWarn>$(NoWarn),CS8002</NoWarn>
<UserSecretsId>3c783a33-e2a5-4acd-99dd-581d563d47e3</UserSecretsId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework Condition="'$(BuildTarget)' == 'net6'">net6.0</TargetFramework>
<TargetFramework Condition="'$(BuildTarget)' == 'net8'">net8.0</TargetFramework>
<TargetFrameworks Condition="'$(BuildTarget)' == ''">net6.0;net8.0</TargetFrameworks>
<TargetFramework Condition="'$(BuildTarget)' == 'net9'">net9.0</TargetFramework>
<TargetFrameworks Condition="'$(BuildTarget)' == ''">net8.0;net9.0</TargetFrameworks>
<IsPackable>false</IsPackable>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>

Expand Down
Loading