Nuget Installer with JS and CSS dependencies


I am currently testing TeamCity and Octopus Deploy for our CI need.

I have followed the guide here to setup the environment:

So far so good.

However, when I added a new package jquery.datatables into my MVC project, I realized that the datatables-related js and css files are not packaged by OctoPack.
This is a problem because we do not commit js and css files from third-party dependencies into our source repo. We rely on Nuget Restore and Install to update fresh pull.

So, the question is : How do I configure this Nuget Installer build step to copy the datatables-related items to Scripts and Content folders before packaging the binary for deployment?

I have attached my build logs for more details on this issue.

1 comment
Comment actions Permalink

Just to close this dicussion and for future reference if anyone needs it, I have managed to resolve this issue by adding this Nuget package to my project:

It adds a BeforeBuild task that helps to copy all the JS/CSS files to the package before OctoPack operation is run.

This issue occurs because apparently Nuget DOES NOT do this "copying" operation, which also explains my difficulty when restoring newly pulled projects.


Please sign in to leave a comment.