ncrunch

NCrunch test fails with FileNotFoundException


My test requires an NHibernate configuration file. The file is added through NCrunch configuration: enter image description here

But the test still fails with:

System.IO.FileNotFoundException: NHibernate configuration file not found.
File name: 'C:\Users\XXXX\AppData\Local\NCrunch\9176\20\_ncrunchreferences.

Is there any way to force files being added to _ncrunchreferences folder?


Solution

  • Fixed the issue with a help of Copy Referenced Assemblies To Workspace option. Might need to clean NCrunch cache for this to take effect.

    Other options to the problem would possibly be using a pre-build event to copy needed resources over (Run pre-build events option has to be enabled in NCrunch project configuration).