Build/Test Issues

Additional files to include not copying all files

Started by garfoot on 1,663 views

I've been using nCrunch for several years and haven't seen this before but now I'm finding a problem with "Additional files to include".

I've a solution that has a large number of nuget packages, some of these packages have tools, build and runtimes folders that contain files that are needed for the build. We use Paket for package management so nCrunch doesn't automatically pick these up (I assume that's why) so I'm adding the following expressions to the solution additional files to include:

..\packages\**\runtimes\**.*
..\packages\**\tools\**.*
..\packages\**\build\**.*
..\packages\**\driver\**.*

Previously this worked fine, but now it seems to be only copying some of the files. For example I might see "packages\systemtests\Selenium.Chrome.WebDriver\build" but not "packages\systemtests\Selenium.Chrome.WebDriver\driver" within the workspace folder.

Adding the directory explicitly works fine but the glob expressions seem to miss some of the files but not others. I've also tried using **.* instead of ** in the middle of the path, same result.

Hopefully someone can help shed some light on this as adding the individual folders one at a time is quite time consuming, especially when the above expressions used to work fine.
Hi, thanks for sharing this issue.

The notation '**' inside a directory name isn't a supported structure of NCrunch's wildcard resolver.

So the path '..\packages\MyDir\runtimes\**.*' is valid, but '..\packages\**\runtimes\**.*' is not supported. The code makes no special allowance for a '**' anywhere except at the end of the specifier, so without going through the code in detail and testing various cases, I cannot confirm exactly what kind of result this will produce but I am fairly certain that it will be the wrong one.

You'll need to either be more specific or more general with the files you're including. For example:

..\packages\MyPackage1\runtimes\**.*
..\packages\MyPackage1\tools\**.*
..\packages\MyPackage2\runtimes\**.*
..\packages\MyPackage2\tools\**.*

Or:

..\packages\**.*
Thanks for the reply. Unfortunately there are quite a few packages that have build, runtimes, tools folders that are not getting pulled in and copying the whole packages folder slows the builds down a lot as we've around 100-150 packages being pulled in to the build. Having the option to specific patterns in the path would be a really useful feature to have but at least I know why it's not working now.

Post a reply

Log in to reply.