Including extra files - VSTS Azure DevOps extension

I’m moving from teamcity to Azure Devlops (VSTS) on one of our big projects and I am having problems packaging the project for octopus.

The issue is that some files aren’t included in the visual studio project because they are being built by a node script and copied into the working directory before MSBuild runs.
In teamcity the OctoPack was including these files by the files-section of the .nuspec file and I am now trying to repricate this in Azure DevOps by using the “Package Application” extension and adding the paths to the folders in the “Include” of the “Advanced” section in this extension but It’s not working as I expect.

These are the main tasks of my build pipeline

  1. Frontend builds by a node script which copies files to the working directory
  2. The solution builds. This step only handles files which are included in the .csproj files
  3. The octopus packaging extension packs it

This is what the task to build the solution looks like:

Here is the octopus packaging task with the paths it should include

What happened before I had the lines of paths to include was that I got a neatly packaged nupkg file containing the project files like I’d expect (but without those missing paths).

Now that I’ve added these included paths they are the only thing in my nupkg file. The orignal project files have been replaced by what I’ve specified in “Include” and their original path isn’t persisted.
In other words: In my nupkg file the javascript files aren’t added into the path /static/javascripts/myjavascript.js but instead the nupkg just contains the content of that path so the file myjavascript.js is in the “root” of the nupkg file.

I can’t find any documentation regarding how to use the “Include” setting other than what’s written in the help button of the extension (which doesn’t go into much detail).

What am I doing wrong here and how should I add files which aren’t included to the project file in visual studio?

I managed to solve this by adding a new copy-task which ran after building the project and frontend builds.
I copied the files and folders which i had in the include task from the sourcedirectory to the artifactstagingdirectory

Hi @Andreas_Ljungstrom,

Glad to hear that you got this sorted. Please let us know if there is anything that we can assist with!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.