Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

NCrunch fails to build files, Visual Studio 2010 builds fine
Canin
#1 Posted : Thursday, July 12, 2012 9:08:55 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/12/2012(UTC)
Posts: 3
Location: The (Companion) Cube

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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:

Quote:
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?
Remco
#2 Posted : Thursday, July 12, 2012 10:09:05 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
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.
2 users thanked Remco for this useful post.
Canin on 7/13/2012(UTC), brianpeiris on 9/27/2012(UTC)
Canin
#3 Posted : Friday, July 13, 2012 3:31:30 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 7/12/2012(UTC)
Posts: 3
Location: The (Companion) Cube

Thanks: 1 times
Was thanked: 1 time(s) in 1 post(s)
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.

Again, thank you for the solution.
1 user thanked Canin for this useful post.
Remco on 7/14/2012(UTC)
brianpeiris
#4 Posted : Thursday, September 27, 2012 3:19:02 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 9/26/2012(UTC)
Posts: 3
Location: Toronto, Canada

Thanks: 5 times
Was thanked: 1 time(s) in 1 post(s)
Remco, your solution worked for me as well. Please consider adding it to the troubleshooting wiki.
Remco
#5 Posted : Thursday, September 27, 2012 9:50:16 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
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.


Cheers,

Remco
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.056 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download