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 https://octopus.com/docs/packaging-applications/nuget-packages/using-octopack.
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?
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!