Adding file to deployment directory

Hello all,

I have a VS 2015 project with quite alot of Typescript stuff in it.

I compile the TS and it generates a d.ts definition file that I need in production.

Problem is I cannot add this file in the project as it will conflict (duplicate identifiers), but I need it in the deployment.

How can I deploy this file (which gets generated on the TeamCity build server by gulp) but not having it in the project file?


Thanks for getting in touch. How are you building the package file that your push in to Octopus? You should be able to add the file to the nupkg or zip package file without it being in your csproj. For example if you are using Octopack you may be able to run gulp first, then use Octopack with a custom nuspec file and the OctoPackEnforceAddingFiles msbuild parameter to add the .d.ts file to the package when the package is being built, see

If that’s not what you are after can you give me a little more detail in how your build/deploy process is set up in TeamCity?


Hello Mark,

I have a Visual Studio 2015 solution with C# and TypeScript files. TeamCity builds this solution and automatically octo packs it. Then it gets sent to Octo deploy and the package gets deployed.

I added the nuspec file, included the 1 file and added the /p:OctoPackEnforceAddingFiles=true build parameter, that worked!