I'm running NCrunch 1.40.0.23b on Visul Studio 2010 Premium (10.0.40219.1 SP1Rel) on Windows 7. A friend is working with roughly the same setup (we got the same version of Visual Studio on the same day and NCrunch on the same day), but I can't attest to the exact version numbers for him.
We have a multi-project solution that builds fine in Visual Studio, but fails to build for NCrunch. The error message we get is:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamTest\Microsoft.TeamTest.targets (14)#0: Could not load file or assembly 'MAIN_PROJECT_NAME, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
After some troubleshooting we think NCrunch is upset about an accessor setup, so I tried deleting the accessor and recreating it. No luck. Besides this project, the other coder has had projects in the past that build in Visual Studio 2010, but fail for NCrunch to build.
NCrunch is so wildly useful that I'd like to get it working, even if such would require a bit of work. Does anyone know why this is happening exactly, or how to fix it?
Try turning on the 'Copy referenced assemblies to workspace' setting for ALL the projects in your solution. MSTest accessors require this setting to be enabled, and while NCrunch does usually turn it on automatically, sometimes it doesn't detect the requirement for it where it should. Note that there will be some performance lost with this setting enabled - but it is unfortunately necessary for MSTest accessors to work correctly. Generally I try to recommend to people to move away from using accessors wherever possible when working with NCrunch.
If you're able to encourage the other coder to share any details about the build failures they are experiencing, I may be able to help with this. Also be sure to have a look at the wiki as it contains much useful information about troubleshooting build problems.
Thank you; that worked perfectly for the both of us. Whenever the other developer works on his other project I'll have him attempt the same solution but if that fails you might seen me returning.
I had thought it was in there, but after checking, it seems I was wrong! Thanks for the prompting. I've added another section to the troubleshooting page describing the issue and how to fix it.