How to include a excluded directory in a solution to a nuget package

I have a post build event in project which copies a folder that is not included in project to a shared directory in project.

xcopy /Y /E “$(TargetDir)\Views\Shared\CommonScripts” "$(ProjectDir)\Views\Shared\CommonScripts"
Now problem is it works fine If I publish it locally. but If I try to do it using teamcity which is creating a nuget package on build and then publish using octopus. That folder is not included. I try to add it in a nuspec file as follows:-

and then defining the prameters in teamcity build parameters but this is also not working. Also please guide how can I make this folder part of a nuget package. or How can I replicate post build event in nuget package.

Hi Sam,

I think you’ll need to look at specifying the files you want in your nuspec manually:

Hope that helps,