Search code examples
c#visual-studioazure-devopsnugetbuild-pipeline

Azure DevOps. Missing file when creating a Nuget package


Maybe someone can help me.

I get the following message when creating a NuGet package: File not found. This is displayed to me in the task "NuGet pack".

The NuGet package is built via Azure DevOps and in the build pipline there is a task "Copy Files to:$(build.artifactstagingdirectory)" in which I see that the folders are not copied from the source (vsts-agent\3\s) to the target (vsts-agent\3\a). All the other folders are copied, just this one is not and so the files it contains are not copied. In vsts-agent\3\s everything is present. My solution in Visual Studio contains the following projects: several UnitTest, several class libraries and a service. The missing folder is the service.

The Agent job in the Build Pipline contains the following Task: Use Nuget, Nuget restore, Assembly manifest Data, Build Solutions ..., Publish symbols Path, Copy Files to..., Publish Artifact:drop, Nuget pack, Nuget push.

What do I need to do so that the service folder is also copied.

Thanks.


Solution

  • I'm not sure if you are using "Copy Files" task, try

    enter image description here