2020-05-21 21:57:47 +12:00
|
|
|
# .NET Desktop
|
|
|
|
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
|
|
|
|
# Add steps that publish symbols, save build artifacts, and more:
|
|
|
|
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
|
|
|
|
|
|
|
|
trigger:
|
2020-06-06 11:02:33 +12:00
|
|
|
- master
|
2020-05-21 21:57:47 +12:00
|
|
|
|
|
|
|
pool:
|
2021-11-17 07:47:49 +13:00
|
|
|
vmImage: 'Windows-latest'
|
|
|
|
# vmImage: 'Windows-2019'
|
2020-05-21 21:57:47 +12:00
|
|
|
|
|
|
|
variables:
|
|
|
|
solution: '**/*.sln'
|
|
|
|
buildPlatform: 'Any CPU'
|
|
|
|
buildConfiguration: 'Release'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- task: NuGetToolInstaller@1
|
|
|
|
|
2020-06-06 05:01:49 +12:00
|
|
|
- task: UseDotNet@2
|
2021-11-17 07:47:49 +13:00
|
|
|
displayName: 'Use .NET Core sdk'
|
2020-06-06 05:01:49 +12:00
|
|
|
inputs:
|
|
|
|
packageType: sdk
|
2021-11-17 07:47:49 +13:00
|
|
|
version: 6.0.x
|
2021-11-17 08:30:19 +13:00
|
|
|
# version: 3.1.102
|
2020-06-06 05:01:49 +12:00
|
|
|
|
2021-06-07 04:36:55 +12:00
|
|
|
#- task: NuGetCommand@2
|
|
|
|
# displayName: NuGet restore
|
|
|
|
# inputs:
|
|
|
|
# restoreSolution: '$(solution)'
|
|
|
|
# feedsToUse: config
|
|
|
|
|
|
|
|
- task: DotNetCoreCLI@2
|
2021-06-07 02:40:04 +12:00
|
|
|
inputs:
|
2021-06-07 04:36:55 +12:00
|
|
|
command: 'restore'
|
|
|
|
projects: '$(solution)'
|
|
|
|
feedsToUse: 'select'
|
2020-06-06 05:01:49 +12:00
|
|
|
|
2020-06-06 07:04:09 +12:00
|
|
|
#- task: DotNetCoreCLI@2
|
|
|
|
# displayName: Publish single-exe x64
|
|
|
|
# inputs:
|
|
|
|
# command: 'publish'
|
|
|
|
# publishWebProjects: false
|
|
|
|
# projects: 'SystemTrayMenu.csproj'
|
|
|
|
# arguments: '-f netcoreapp3.1 -c Release /p:PublishSingleFile=true /p:RuntimeIdentifier=win-x64'
|
|
|
|
# zipAfterPublish: false
|
|
|
|
#
|
|
|
|
#- task: CmdLine@2
|
|
|
|
# displayName: Rename single-exe x64
|
|
|
|
# inputs:
|
|
|
|
# script: 'rename $(Build.SourcesDirectory)\bin\Release\netcoreapp3.1\win-x64\publish\SystemTrayMenu.exe SystemTrayMenu-x64.exe'#
|
|
|
|
#
|
|
|
|
#- task: DotNetCoreCLI@2
|
|
|
|
# displayName: Publish single-exe x86
|
|
|
|
# inputs:
|
|
|
|
# command: 'publish'
|
|
|
|
# publishWebProjects: false
|
|
|
|
# projects: 'SystemTrayMenu.csproj'
|
|
|
|
# arguments: '-f netcoreapp3.1 -c Release /p:PublishSingleFile=true /p:RuntimeIdentifier=win-x86'
|
|
|
|
# zipAfterPublish: false
|
|
|
|
#
|
|
|
|
#- task: CmdLine@2
|
|
|
|
# displayName: Rename single-exe x86
|
|
|
|
# inputs:
|
|
|
|
# script: 'rename $(Build.SourcesDirectory)\bin\Release\netcoreapp3.1\win-x86\publish\SystemTrayMenu.exe SystemTrayMenu-x86.exe'
|
2020-06-06 05:01:49 +12:00
|
|
|
|
2020-06-06 07:48:34 +12:00
|
|
|
- task: kherzog.AssemblyInfoReader.assembly-info-reader-build-task.AssembyInfoReader@2
|
|
|
|
displayName: 'Generate variables **\AssemblyInfo.cs '
|
|
|
|
|
2020-06-06 07:04:09 +12:00
|
|
|
- task: MSBuild@1
|
|
|
|
displayName: 'MSBuild'
|
2020-06-06 05:01:49 +12:00
|
|
|
inputs:
|
2020-06-06 07:04:09 +12:00
|
|
|
solution: '**/*.sln'
|
2020-06-21 23:12:38 +12:00
|
|
|
msbuildArguments: '-p:Configuration=Release -p:Platform="Any CPU"'
|
2020-06-21 23:31:04 +12:00
|
|
|
# msbuildArguments: '-p:Configuration=Release -p:Platform=x64'
|
|
|
|
# msbuildArguments: '-p:Configuration=Release -p:Platform=x86'
|
2020-06-06 07:04:09 +12:00
|
|
|
|
2020-06-06 07:48:34 +12:00
|
|
|
#- task: CopyFiles@2
|
|
|
|
# displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
|
|
|
|
# inputs:
|
|
|
|
# SourceFolder: '$(Build.SourcesDirectory)\bin\Release\netcoreapp3.1'
|
|
|
|
## Contents: **
|
|
|
|
## Contents: |
|
|
|
|
## win-x64\publish\SystemTrayMenu-x64.exe
|
|
|
|
## win-x86\publish\SystemTrayMenu-x86.exe
|
|
|
|
# TargetFolder: '$(build.artifactstagingdirectory)'
|
|
|
|
# flattenFolders: true
|
|
|
|
|
|
|
|
- task: ArchiveFiles@2
|
|
|
|
displayName: 'Archive $(Build.ArtifactStagingDirectory)'
|
2021-11-17 08:31:42 +13:00
|
|
|
inputs:
|
2021-11-17 08:30:19 +13:00
|
|
|
rootFolderOrFile: '$(Build.SourcesDirectory)\bin\AnyCPU\Release\net6.0-windows10.0.22000.0\'
|
|
|
|
# rootFolderOrFile: '$(Build.SourcesDirectory)\bin\AnyCPU\Release\netcoreapp3.1\'
|
2020-06-21 23:31:04 +12:00
|
|
|
# rootFolderOrFile: '$(Build.SourcesDirectory)\bin\x64\Release\netcoreapp3.1\'
|
|
|
|
# rootFolderOrFile: '$(Build.SourcesDirectory)\bin\x86\Release\netcoreapp3.1\'
|
2020-06-06 08:14:27 +12:00
|
|
|
includeRootFolder: false
|
2020-06-06 07:48:34 +12:00
|
|
|
archiveFile: '$(Build.ArtifactStagingDirectory)/SystemTrayMenu-$(AssemblyInfo.AssemblyVersion).zip'
|
2020-05-21 21:57:47 +12:00
|
|
|
|
2020-06-06 08:40:18 +12:00
|
|
|
- task: CopyFiles@2
|
|
|
|
displayName: 'Copy AssemblyInfo.cs to: $(build.artifactstagingdirectory)'
|
|
|
|
inputs:
|
2020-06-06 08:47:34 +12:00
|
|
|
SourceFolder: '$(Build.SourcesDirectory)\Properties'
|
2020-06-06 08:40:18 +12:00
|
|
|
Contents: |
|
|
|
|
AssemblyInfo.cs
|
|
|
|
TargetFolder: '$(build.artifactstagingdirectory)'
|
|
|
|
|
2020-06-06 05:01:49 +12:00
|
|
|
- task: PublishBuildArtifacts@1
|
|
|
|
displayName: 'Publish Artifact: drop'
|
2020-05-21 21:57:47 +12:00
|
|
|
inputs:
|
2020-06-06 07:48:34 +12:00
|
|
|
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|