I have a test which relies on being able to find files. I am using the TestContext.TestDeploymentDir to set the base directory where the structure will be located. I am also using the DeploymentItem attribute to tell VSTS that the items should be part of the test deployment, as well as set the Enable Deployment bit for the solution. The tests run successfully with VSTS and CodeRush Test Runner but do not in NCrunch.
<Edit>
Looks like CodeRush Test Runner is having an issue finding the resources also because it is now failing after a clean solution.
</Edit>
The error I get is a DirectoryNotFoundException on:
%USERPROFILE%\AppData\Local\NCrunch\4116\25\TestResults\1cb3ef5e-f7c3-4424-bb95-f910ea7ae16f\Out\Configurations\1234\configuration.js
I used ProcMon and found that the files are getting deployed to the following locations.
%USERPROFILE%\AppData\Local\NCrunch\4116\25\Absg.MyCubixx.FileSystemConfigurationProvider.Tests\Configurations\1234\configuration.js
and
%USERPROFILE%\AppData\Local\NCrunch\4116\25\Absg.MyCubixx.FileSystemConfigurationProvider.Tests\bin\Debug\Configurations\1234\configuration.js
Is there a better property to use to determine the base deployment directory? Or for that matter just a better method?
Regards,
Shane Holder
Edited 24 Jan 2012 14:57 UTC