I'm seeing an issue where Ncrunch doesn't appear to be handling referenced libraries that aren't in the GAC and aren't part of the solution itself. Details below:
Solution folder structure: (I've modified the names so as not to get in trouble with my employer)
. Trunk
. |- MySolution.sln
. |- Src
. | |- Project1Folder (With Project1.csproj)
. | |- Project2Folder
. | `- ProjectNFolder
. | |-Debug
. | `- Release
. |- Lib
. `- Bin
. |- Debug
. `- Release
Solution has multiple projects, where Project1 has a project reference to Project2 and ProjectN, etc. In many cases, projects also have references to .dlls in the Lib folder which are not build by the solution and which are not in the GAC. For example, the nUnit binaries may be in the Lib folder, and ProjectN would reference by file the nunit.dll in Lib. The projects are configured to place their outputs in the Trunck/Bin folder.
Here's an example of the lines in the .csproj file:
. <ItemGroup>
. <Reference Include="Some.ThirdParty.Library, Version=4.0.14.0, Culture=neutral, PublicKeyToken=xxxxx, processorArchitecture=MSIL">
. <SpecificVersion>False</SpecificVersion>
. <HintPath>..\..\..\Lib\$(Configuration)\Some.ThirdParty.Library.dll</HintPath>
. </Reference>
What I'm seeing is that Ncrunch is able to compile the project, but is running into some issue post-compile. Specifically, the Ncrunch Tests window shows a red X beside the project name, with this error message:
Quote: NCrunch: If you are experiencing problems in getting this project to build, have a look at
https://www.ncrunch.net/...ng_project-build-issues
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (3341): Cannot register assembly "C:\Users\wrij01\AppData\Local\NCrunch\8424\11\Bin\Debug\Project1.dll". Could not load file or assembly 'Some.ThirdParty.Library, Version=4.0.14.0, Culture=neutral, PublicKeyToken=xxxxx' or one of its dependencies. The system cannot find the file specified.
When I look in the referenced folders, I see the Some.ThirdParty.Library.dll in the obj file, but not in the bin folder.
. C:\Users\wrij01\AppData\Local\NCrunch\8424\11
. |- Bin
. | `- Debug
. | |- MyProject1.dll
. | |- MyProject1.pdb
. | `- MyProject1.xml
. `- Src
. `- Project1Folder
. |- obj
. | `- Debug
. | |- Some.ThirdParty.Library.dll
. | `- <other files you'd expect to see in the obj folder>
. `- <full project source tree>
Please let me know if I can provide additional information. If needed, I can try to create a sample VS solution and project that to you.