0
votes

I have tried to Deploy an ARM template from GitHub with Azure DevOps Pipeline (CI/CD). when i click the deploy button I get the following error.

https://developercommunity.visualstudio.com/content/problem/349729/error-no-package-found-with-specified-pattern-dar1.html

##[error]Error: No package found with specified pattern: d:\a\r1\a***.zip

I did as per the suggestion in the following link but doesnt work for me . Added - task: PublishBuildArtifacts@1 to last line of the azure-pipelines.yml file

azure-pipelines.yml

trigger:
- master

pool:
  vmImage: 'windows-latest'

variables:
  solution: '**/*.sln'
  buildPlatform: 'Any CPU'
  buildConfiguration: 'Release'

steps:
- task: NuGetToolInstaller@1

- task: NuGetCommand@2
  inputs:
    restoreSolution: '$(solution)'

- task: VSBuild@1
  inputs:
    solution: '$(solution)'
    msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:DesktopBuildPackageLocation="$(build.artifactStagingDirectory)\WebApp.zip" /p:DeployIisAppPath="Default Web Site"'
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: VSTest@2
  inputs:
    platform: '$(buildPlatform)'
    configuration: '$(buildConfiguration)'

- task: PublishBuildArtifacts@1

Screenshot

enter image description here

2
Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.Leo Liu-MSFT

2 Answers

1
votes

basically this means your package is not being created or is being created in path you are not scanning; try this:

- task: PublishBuildArtifacts@1
  inputs:
    #pathtoPublish: '$(Build.ArtifactStagingDirectory)' 
0
votes

Azure Devops : ##[error]Error: No package found with specified pattern: d:\a\r1\a***.zip

If you are using "Azure App Service Deploy" task, set the "Package or folder" path to: $(System.DefaultWorkingDirectory)\<YourBuildPipelineName>\<Artifact name>\WebApp.zip.

You can get the path from the log in the Download Artifacts in your release pipeline:

For example:

enter image description here

The value should be in the yellow area.

Alternatively, you can select the .zip file by the option ...:

enter image description here

Hope this helps.