I am currently working on an interface based on a .NET 4.7 framework. The data is pushed to Azure via Sourcetree and then deployed accordingly. This is the code of my YAML file of the pipeline:
- master
pool:
vmImage: 'windows-2022'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
targetDirectory: '$(build.artifactstagingdirectory)\projectName'
steps:
- task: NuGetToolInstaller@0
- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'
- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=false /p:PackageLocation="$(targetDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
inputs:
PathtoPublish: '$(targetDirectory)'
ArtifactName: 'PublishBuildArtifacts'
preservePaths: false
Unfortunately, the deployments are always "staggered". Thus, the current version is never visible on the website. It only shows the output of 2 to 3 previous deployments. However, the artifacts on Azure and the data on the FTP server are up to date.
Has anyone had to deal with a similar problem and could help me?
Many thanks in advance!