Skip to content

Commit 5dc361d

Browse files
tracyboehrerceciliaavilasw-joelmut
authored
Cherry-pick fixes (#6894)
* Add support for .NET 9.0 (#6887) * Add NET9 and remove NET6 target frameworks * Configure NETAnalyzers version in Directory.Build.props * Update yamls to support NET 9.0 * Update tests to pass on Mac build. * [#6889] CQA to support TokenCredential instead of key (#6892) * Add support for MSI to access CQA service * Use IsNullOrWhiteSpace instead of IsNullOrEmpty * Catch exception in GetTokenAsync call * Fix MemoryStream Converter when serializing (#6888) --------- Co-authored-by: Cecilia Avila <44245136+ceciliaavila@users.noreply.github.com> Co-authored-by: Joel Mut <62260472+sw-joelmut@users.noreply.github.com>
1 parent bc17a5d commit 5dc361d

File tree

78 files changed

+431
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+431
-235
lines changed

Directory.Build.props

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@
2020
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)BotBuilder-DotNet.ruleset</CodeAnalysisRuleSet>
2121
<RunSettingsFilePath>$(MSBuildThisFileDirectory)\CodeCoverage.runsettings</RunSettingsFilePath>
2222
</PropertyGroup>
23-
23+
2424
<ItemGroup>
2525
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" />
2626
</ItemGroup>
2727

28+
<ItemGroup>
29+
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="9.0.0" PrivateAssets="all" />
30+
</ItemGroup>
31+
2832
<PropertyGroup>
2933
<Company>Microsoft</Company>
3034

FunctionalTests/Microsoft.Bot.Builder.FunctionalTests/Microsoft.Bot.Builder.FunctionalTests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<IsPackable>false</IsPackable>
66
<Configurations>Debug;Release;</Configurations>
77
</PropertyGroup>

build/onebranch/ci-api-validation-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ steps:
22
- task: DownloadPipelineArtifact@2
33
displayName: 'Download BotBuilderDLLs from Artifacts'
44
inputs:
5-
artifactName: 'BotBuilderDLLs-Debug-Windows-net8'
5+
artifactName: 'BotBuilderDLLs-Debug-Windows-net9'
66
targetPath: '$(System.ArtifactsDirectory)/OutputDlls'
77

88
- task: DownloadPipelineArtifact@2

build/onebranch/ci-test-steps.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,32 @@ steps:
2020
customCommand: 'install -g @microsoft/botframework-cli@next'
2121

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

3030
- task: DotNetCoreCLI@2
31-
displayName: 'dotnet test (release) 6.0'
31+
displayName: 'dotnet test (release) 8.0'
3232
inputs:
3333
command: test
3434
projects: |
3535
Tests/**/*Tests.csproj
3636
37-
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'
38-
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net6'))
37+
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'
38+
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))
3939

4040
- task: DotNetCoreCLI@2
41-
displayName: 'dotnet test (release) 8.0'
41+
displayName: 'dotnet test (release) 9.0'
4242
inputs:
4343
command: test
4444
projects: |
4545
Tests/**/*Tests.csproj
4646
47-
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'
48-
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))
47+
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'
48+
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net9'))
4949

5050
- powershell: |
5151
# This task copies the code coverage file created by dotnet test into a well known location. In all

build/onebranch/pr.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,34 +42,34 @@ variables:
4242
stages:
4343
- stage: Build
4444
jobs:
45-
- job: Debug_Windows_Configuration_6
45+
- job: Debug_Windows_Configuration_8
4646
variables:
4747
BuildConfiguration: Debug-Windows
48-
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
48+
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
4949
steps:
5050
- template: ci-build-steps.yml
5151
- template: ci-test-steps.yml
5252
- template: ci-component-detection-steps.yml
53-
- job: Debug_Windows_Configuration_8
53+
- job: Debug_Windows_Configuration_9
5454
variables:
5555
BuildConfiguration: Debug-Windows
56-
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
56+
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
5757
steps:
5858
- template: ci-build-steps.yml
5959
- template: ci-test-steps.yml
6060
- template: ci-component-detection-steps.yml
61-
- job: Release_Windows_Configuration_6
61+
- job: Release_Windows_Configuration_8
6262
variables:
6363
BuildConfiguration: Release-Windows
64-
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
64+
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
6565
steps:
6666
- template: ci-build-steps.yml
6767
- template: ci-test-steps.yml
6868
- template: ci-component-detection-steps.yml
69-
- job: Release_Windows_Configuration_8
69+
- job: Release_Windows_Configuration_9
7070
variables:
7171
BuildConfiguration: Release-Windows
72-
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
72+
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
7373
PublishCoverage: true
7474
steps:
7575
- template: ci-build-steps.yml

build/yaml/botbuilder-dotnet-ci-mac.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ variables:
1919
steps:
2020
# 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.
2121
- task: UseDotNet@2
22-
displayName: 'Use .Net sdk 6.0'
22+
displayName: 'Use .Net sdk 8.0'
2323
inputs:
24-
version: 6.0.x
24+
version: 8.0.x
2525

2626
- task: UseDotNet@2
27-
displayName: 'Use .Net sdk 8.0'
27+
displayName: 'Use .Net sdk 9.0'
2828
inputs:
29-
version: 8.0.x
29+
version: 9.0.x
3030

3131
- powershell: 'gci env:* | sort-object name | Format-Table -AutoSize -Wrap'
3232
displayName: 'Display env vars'

build/yaml/botbuilder-dotnet-ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,31 +42,31 @@ variables:
4242
stages:
4343
- stage: Build
4444
jobs:
45-
- job: Debug_Windows_Configuration_6
45+
- job: Debug_Windows_Configuration_8
4646
variables:
4747
BuildConfiguration: Debug-Windows
48-
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
48+
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
4949
steps:
5050
- template: ci-build-steps.yml
5151
- template: ci-test-steps.yml
52-
- job: Debug_Windows_Configuration_8
52+
- job: Debug_Windows_Configuration_9
5353
variables:
5454
BuildConfiguration: Debug-Windows
55-
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
55+
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
5656
steps:
5757
- template: ci-build-steps.yml
5858
- template: ci-test-steps.yml
59-
- job: Release_Windows_Configuration_6
59+
- job: Release_Windows_Configuration_8
6060
variables:
6161
BuildConfiguration: Release-Windows
62-
BuildTarget: 'net6' # set the TargetFramework property for tests to use net6.0
62+
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
6363
steps:
6464
- template: ci-build-steps.yml
6565
- template: ci-test-steps.yml
66-
- job: Release_Windows_Configuration_8
66+
- job: Release_Windows_Configuration_9
6767
variables:
6868
BuildConfiguration: Release-Windows
69-
BuildTarget: 'net8' # set the TargetFramework property for tests to use net8.0
69+
BuildTarget: 'net9' # set the TargetFramework property for tests to use net9.0
7070
PublishCoverage: true
7171
steps:
7272
- template: ci-build-steps.yml

build/yaml/ci-api-validation-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ steps:
22
- task: DownloadPipelineArtifact@2
33
displayName: 'Download BotBuilderDLLs from Artifacts'
44
inputs:
5-
artifactName: 'BotBuilderDLLs-Debug-Windows-net8'
5+
artifactName: 'BotBuilderDLLs-Debug-Windows-net9'
66
targetPath: '$(System.ArtifactsDirectory)/OutputDlls'
77

88
- task: DownloadPipelineArtifact@2

build/yaml/ci-test-steps.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,32 @@ steps:
2020
customCommand: 'install -g @microsoft/botframework-cli@next'
2121

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

3030
- task: DotNetCoreCLI@2
31-
displayName: 'dotnet test (release) 6.0'
31+
displayName: 'dotnet test (release) 8.0'
3232
inputs:
3333
command: test
3434
projects: |
3535
Tests/**/*Tests.csproj
3636
37-
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'
38-
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net6'))
37+
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'
38+
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))
3939

4040
- task: DotNetCoreCLI@2
41-
displayName: 'dotnet test (release) 8.0'
41+
displayName: 'dotnet test (release) 9.0'
4242
inputs:
4343
command: test
4444
projects: |
4545
Tests/**/*Tests.csproj
4646
47-
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'
48-
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net8'))
47+
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'
48+
condition: and(succeeded(), eq(variables['BuildConfiguration'],'Release-Windows'), eq(variables['BuildTarget'],'net9'))
4949

5050
- powershell: |
5151
# This task copies the code coverage file created by dotnet test into a well known location. In all

build/yaml/functional-test-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ steps:
88
command: publish
99
publishWebProjects: false
1010
projects: '$(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\Microsoft.Bot.Builder.TestBot.csproj'
11-
arguments: '-r linux-x64 --output $(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\PublishedBot --configuration $(TestConfiguration) --framework net8.0'
11+
arguments: '-r linux-x64 --output $(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\PublishedBot --configuration $(TestConfiguration) --framework net9.0'
1212

1313
- task: CopyFiles@2
1414
displayName: 'Copy root Directory.Build.props to staging'

0 commit comments

Comments
 (0)