I am working with an older code and attempting to build an ASP.NET website (no .csproj files). I've created a pipeline for ASP.NET added some tasks to my .yml:
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
buildPlatform: 'Any CPU'
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
- task: VSBuild@1
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
- task: VSTest@2
- task: PublishPipelineArtifact@1
However, when I run the pipeline, it fails on the VSBuild task:
I think the problem is in line 18 where the -p ..\BOMViewer\ is specifying a directory that doesn't exist.
Do I need to follow DJ Grossman's solution later: Can Azure DevOps Pipelines build an ASP.NET Web Site?
How to specify -p \BOMViewer instead of the above?
I changed solution to .publishproj from .sln in my YAML . But VSBuild doesn't like the change: