I understand that Azure projects are not officially supported by NCrunch. This problem seems to be one that, while encountered here in an Azure Functions project, could just as well occur in a non-Azure project.
Reproduction of this issue is easy. Here are the steps:
1. Create a new Visual Studio project using the built in “Azure Functions” template. (This template is listed under the “Cloud” folder in the New Project dialogue box.)
2. Build the project. No modifications necessary. It will build successfully.
3. Enable NCrunch using the default settings.
4. NCrunch gives an immediate build failure message.
The problem seems to be that if a project build happens to put the new assembly in a subdirectory of the project output directory rather than directly in the root, NCrunch will fail to find it. In the example case above, the project created by the built-in VS template for Azure Functions, will place it’s output file in a subfolder called “<project name>\bin\Debug\net461\bin” rather than directly in the root output folder (<project name>\bin\Debug\net461). NCrunch apparently does not recursively check any subfolders for the file.
I located a discussion on this issue (with the exception that NCrunch isn’t involved) in the Azure Functions Github site at:
https://github.com/Azure...re-Functions/issues/441
One of the project maintainers appears to believe that their side of the issue has been addressed. This does not appear to be the case (at least from the NCrunch perspective).
Any guidance would be appreciated.