Skip to content

Commit

Permalink
fix: Support .NET 7 on azure pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Sagilio <Sagilio@outlook.com>
  • Loading branch information
sagilio committed Jun 2, 2022
1 parent 601a6c0 commit 70474ee
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 44 deletions.
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,17 @@ indent_size = 2
[*.{xml,stylecop,resx,ruleset}]
indent_size = 2

# Yml files
[*.yml]
indent_size = 2

# Xml config files
[*.{props,targets,config,nuspec}]
indent_size = 2

# Shell scripts
[*.sh]
end_of_line = lf

[*.{cmd, bat}]
end_of_line = crlf
97 changes: 53 additions & 44 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,60 @@
trigger:
- master
- master
- preview

variables:
buildConfiguration: 'Release'

stages:
- stage: Windows
displayName: Build and Test
jobs:
- job: Build
- stage: Windows
displayName: Build and Test
pool:
vmImage: 'windows-latest'

steps:
- task : UseDotNet@2
displayName: Add .NET 3.1.x SDK
inputs:
packageType: 'sdk'
version: '3.1.x'

- task : UseDotNet@2
displayName: Add .NET 5.0.x SDK
inputs:
packageType: 'sdk'
version: '5.0.x'

- task : UseDotNet@2
displayName: Add .NET 6.0.x SDK
inputs:
packageType: 'sdk'
version: '6.0.100-preview.7.21379.14'

- task: DotNetCoreCLI@2
displayName: Restore projects
inputs:
command: 'restore'
feedsToUse: 'select'

- task: DotNetCoreCLI@2
displayName: Build projects
inputs:
command: 'build'
arguments: '-c $(buildConfiguration) --no-restore'

- task: DotNetCoreCLI@2
displayName: Test projects
inputs:
command: 'test'
arguments: '-c $(buildConfiguration) --no-build --no-restore --verbosity normal'
jobs:
- job: Build
displayName: Build and Test
pool:
vmImage: 'windows-latest'

steps:
- task: UseDotNet@2
displayName: Setup 3.1.x .NET SDK
inputs:
packageType: 'sdk'
version: '3.1.x'

- task: UseDotNet@2
displayName: Setup 5.0.x .NET SDKs
inputs:
packageType: 'sdk'
version: '5.0.x'

- task: UseDotNet@2
displayName: Setup 6.0.x .NET SDKs
inputs:
packageType: 'sdk'
version: '6.0.x'

- task: UseDotNet@2
displayName: Setup 7.0.x .NET SDKs
inputs:
packageType: 'sdk'
version: '7.0.x'
includePreviewVersions: true


- task: DotNetCoreCLI@2
displayName: Restore projects
inputs:
command: 'restore'
feedsToUse: 'select'

- task: DotNetCoreCLI@2
displayName: Build projects
inputs:
command: 'build'
arguments: '-c $(buildConfiguration) --no-restore'

- task: DotNetCoreCLI@2
displayName: Test projects
inputs:
command: 'test'
arguments: '-c $(buildConfiguration) --no-build --no-restore --verbosity normal'

0 comments on commit 70474ee

Please sign in to comment.