If you mean the publish build artifact step and you see any warning like this:
##[warning]Directory 'D:a1a' is empty. Nothing will be added to build artifact 'drop'.
You are publishing the default directory: $(Build.ArtifactStagingDirectory) while your project is not in this directory. You can check it in your publish build artifact task.
If it is the case, you need to add a copy file task to copy the artifact files from the build output path to $(Build.ArtifactStagingDirectory).
2
Answers
Is it a build or publish issue ?
In the logs of the build step, are all projects build ?
In the publish step, did you select "Publish web projects" ?
If you want to publish other projects (in other artifacts), you may need to add other publish steps.
If you mean the publish build artifact step and you see any warning like this:
You are publishing the default directory:
$(Build.ArtifactStagingDirectory)
while your project is not in this directory. You can check it in your publish build artifact task.If it is the case, you need to add a copy file task to copy the artifact files from the build output path to
$(Build.ArtifactStagingDirectory)
.