DEV Community

Discussion on: Create & Deploy Azure Function ⚡ using VS code and Azure DevOps (CI/CD)

 
usmslm102 profile image
Usama Ansari

It seems you have deleted the test project but the reference is still there in solution file. If you delete the project from file explorer you have to remove the reference from solution file as well. If you can provide me more details the project structure and the build yaml file I can help you more on this.

Thread Thread
 
shajay99 profile image
ajay sharma • Edited

Usama Sir, Request you to please check if the stages of the Pipeline is OKay, as now all the stages are passing. And here it the YAML file. sorry the formatting is not OKay.

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)'

Thread Thread
 
usmslm102 profile image
Usama Ansari

Build pipeline looks ok. There might be the issue with your solution file. You might have a reference of "Hermes.Test.csproj" in your solution file but the actual csproj file doesn't exist.

Thread Thread
 
shajay99 profile image
ajay sharma

Thanks Usama Sir.. thanks for guiding me..
Sir, in my pipeline, PUBLISH and PUBLISH ARTIFACT are not visible. Have I selected wrong template ??