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
- Frontend builds by a node script which copies files to the working directory
- The solution builds. This step only handles files which are included in the .csproj files
- 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?