Build/Test Issues

v2.25, tests fail, indicate file not present

Started by MikeWard on 5,455 views

Upgraded from 2.23 to 2.25. Several tests fail that passed in 2.23. One example of a failed test:

[h]System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\mike\AppData\Local\NCrunch\15556\4\PortalTests\bin\Debug\assets\subject-view-toxicities.csv'.[/h]

When a check the folder the assets folder is not in the Debug folder, it's in the bin folder.

[img=http://i.imgur.com/QqilPlV.png]v.2.25[/img]

For reference here is folder when running v2.23

[img=http://i.imgur.com/IYCkyda.png]v2.23[/img]

Using VS 2015, latest patches, Windows 10 Anniversary.

Edited

Hi, thanks for sharing this.

v2.24 included a change in how copied resource files are handled. Prior to v2.24, NCrunch would attempt to infer where the file should be copied and it would copy the file itself using its own logic. This caused some problems with files using a 'Link' property or that had their target directory adjusted through other build steps. Consequently some files were landing in the wrong place.

Under v2.24 (and v2.25), the target copy dir from files is now taken directly from MSBuild, so it should actually be the same as where MSBuild normally places it.

Can you confirm where MSBuild deposits the file if you build it in your foreground solution? Does the file use the 'Link' property?
The files show up in the expected folder when building. The output path for the solution is "bin/" and not "/bin/Debug". Maybe that has something to do with it. CSPROJ file below:

http://expirebox.com/download/6fad90e07a451012f97e74b475304bc8.html
Thanks for sharing the sample project. Using this, I've had a go at trying to build a use case to reproduce this issue. Unfortunately, it seems that no matter what I try, the file always seems to end up in the right place (assets\filename). There must be something I'm missing here.

Is there any chance you can build a full sample solution you can share with me?

Post a reply

Log in to reply.