I’m running into an issue when octopacking a web application that needs to produce a XML documentation file (used to feed swagger). But only when running the build on the (TFS) build server.
The .XML file is created in the /src/…/bin folder of the application. Team Build copies the /src/…/bin files into another /bin folder. Octopack seems to pick up both copies of the .XML file however. Because both are in the nuspec, the “pack” won’t run.
I have tries different folder to output the XML file into, but none have worked so far.
Is there any way to solve this from my end? Or should octopack be more careful when building the list of files for the nuspec and maybe skip the bin folder when adding the content ?
<file src="E:\Builds\5762\Biblo\Trendstop_Main_Full\src\Source\src\Trendstop.WebApi\bin\Trendstop.WebApi.XML" target="bin\Trendstop.WebApi.XML" /> <file src="E:\Builds\5762\Biblo\Trendstop_Main_Full\bin\Trendstop.WebApi.dll" target="bin\Trendstop.WebApi.dll" /> <file src="E:\Builds\5762\Biblo\Trendstop_Main_Full\bin\Trendstop.WebApi.pdb" target="bin\Trendstop.WebApi.pdb" /> <file src="E:\Builds\5762\Biblo\Trendstop_Main_Full\bin\Trendstop.WebApi.XML" target="bin\Trendstop.WebApi.XML" />
I tried using the OctoPackNuGetArguments with an exclude, but the nuspec is already built at the moment, so it doesn’t help.
Would creating a custom nuspec with an exclude of one of the duplicate paths help? I don’t want to keep updating the nuspec when I add new files to the project, so OctoPackEnforceAddingFiles should be set to true. But I don’t think octopack will actually look at the exclude that is aleady in the nuspec file before adding all files.