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

Notification

Icon
Error

Error executing tests
amvij
#1 Posted : Monday, November 2, 2015 3:05:26 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi,

All my tests fail in NCrunch, with error:

NCrunch encountered an error while trying to construct an environment to execute this test: System.IO.FileNotFoundException: Could not load file or assembly 'nCrunch.Module.MSTest, Version=2.17.0.16, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.


Is this some installation issue or what? I could not locate this file in manual installation ZIP either!!
Remco
#2 Posted : Monday, November 2, 2015 9:17:13 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Thanks for sharing this issue.

When installing via ZIP, make sure you fully extract everything from the ZIP. This file is under the path: Remco Software\NCrunch for Visual Studio 20xx\Modules\MSTest\nCrunch.Module.MSTest.dll

I've just checked the ZIP, and it's definitely there. Most likely something with the way it's been extracted has made NCrunch unable to find it. Be sure to check that Windows isn't blocking the extracted files after you've decompressed them (this is very annoying when it happens).
amvij
#3 Posted : Tuesday, November 3, 2015 8:27:48 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi,

Found the file, but still got the error. Had to copy that to: "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2015" from the above path to get it working.
Remco
#4 Posted : Tuesday, November 3, 2015 9:27:34 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Would you be able to submit a bug report after you've had NCrunch fail to find this file? It shouldn't need to have it present in the root directory. Something is not working right here.
amvij
#5 Posted : Tuesday, November 3, 2015 9:57:46 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Unfortunately couldn't submit due to proxy/firewall issues. Could I send the report to some email?
Remco
#6 Posted : Tuesday, November 3, 2015 10:55:34 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
You can upload using the contact form - https://www.ncrunch.net/support/contact
amvij
#7 Posted : Monday, November 16, 2015 9:40:11 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi,

I have uploaded the report using the contact form. The issue still persist after 2.18!!
Do you still need some info?

Thanks.
Remco
#8 Posted : Monday, November 16, 2015 9:43:17 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Hi,

Sorry I haven't received anything via the contact form. When was the file sent? Was it particularly large?
amvij
#9 Posted : Monday, November 16, 2015 9:54:36 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
I tried uploading once again, did you get that now?
Remco
#10 Posted : Monday, November 16, 2015 11:59:49 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks! Got it.

Could you check if you have any .crunchmodule files sitting under C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2015 ?

These files should only be inside the nested module directories.
amvij
#11 Posted : Monday, November 16, 2015 2:49:23 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
There is no .crunchmodule file there. But I think something is wrong with my setup...
In one of my other solutions, the NCrunch failed to run any test cases due to a missing dependent assembly, where as the solution builds perfectly fine and all assemblies being there! I don't think I can put everything inside the extension folder.

Now I track back the time it started failing. I had VS 2013 and VS 2015 installed on my PC. Then I uninstalled VS 2013 and reinstalled '15. After that it stopped working.. The same solution which hadn't been working on my PC works on another.

Can you see anything in the logs?
amvij
#12 Posted : Monday, November 16, 2015 3:00:18 PM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Now I see something weird... I reverted to version NCrunch v2.16 (Released 10 Aug 2015), and it works perfectly fine...
Remco
#13 Posted : Monday, November 16, 2015 10:14:32 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
v2.16 had all the NCrunch modules stored in the root installation directory. So I guess reverting back to 2.16 would put in place the same workaround you'd already discovered (moving the MSTest module to the root install path). In v2.17 they were moved into their own subdirectories to make way for the new NUnit integration.

The area NCrunch is failing is inside a temporary application domain it creates within the engine process. This app domain is used to prepare a dynamically constructed assembly used for MSTest execution. Why the application domain would fail to load the assembly makes no sense - we need to get more information about the loading action.

I'm wondering if we could try turning on Fusion logging on your system, then finding the logs for the loading of the MSTest module. See here for how to do this - https://stackoverflow.com/questions/255669/how-to-enable-assembly-bind-failure-logging-fusion-in-net.

When the logging is enabled, you'll need to run NCrunch through the failure case, then find the log file for the failed loading of the nCrunch.Module.MSTest.dll file inside the nCrunch.EngineHost.exe process. If you can copy/paste the contents of the log to here, we might find a useful clue as to why this is failing.

Of course, if you want, you can still just keep going with the workaround you had in place previously (copying the file to the root directory). I'd still really like to know why this is failing though :)
amvij
#14 Posted : Tuesday, November 17, 2015 8:47:09 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Hi,

This is from NCrunch output, I try to find more logs...

Assembly manager loaded from: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll
Running under executable C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2015\nCrunch.EngineHost46.x64.exe
--- A detailed error log follows.

=== Pre-bind state information ===
LOG: DisplayName = nCrunch.Module.MSTest, Version=2.18.0.3, Culture=neutral, PublicKeyToken=null
(Fully-specified)
LOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2015
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: This bind starts in default load context.
LOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Remco Software\NCrunch for Visual Studio 2015\nCrunch.EngineHost46.x64.exe.Config
LOG: Using host configuration file:
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2015/nCrunch.Module.MSTest.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2015/nCrunch.Module.MSTest/nCrunch.Module.MSTest.DLL.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2015/nCrunch.Module.MSTest.EXE.
LOG: Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/Extensions/Remco Software/NCrunch for Visual Studio 2015/nCrunch.Module.MSTest/nCrunch.Module.MSTest.EXE.
Remco
#15 Posted : Tuesday, November 17, 2015 9:57:48 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
Thanks!

I've managed to identify a couple of things that might have the potential to cause the problem you've found. I still have no way to reproduce it, and it isn't clear to me why this is happening on your system and not on others .. though I'd like to try including a speculative fix for it in the next release so at least you won't need to copy files around after every install.

So for now, I'd suggest just copying the MSTest module into the root install directory. There should be no side affects caused by doing this.
amvij
#16 Posted : Wednesday, November 18, 2015 10:47:19 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Thanks! I do as you suggest... Would wait for next release.
Remco
#17 Posted : Wednesday, December 16, 2015 3:22:13 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 959 times
Was thanked: 1290 time(s) in 1196 post(s)
I haven't yet found a way to reproduce this problem, but the code involved has been redesigned. I hope that NCrunch v2.19 should solve this for you - http://www.ncrunch.net/download.
amvij
#18 Posted : Wednesday, December 16, 2015 10:58:13 AM(UTC)
Rank: Member

Groups: Registered
Joined: 8/10/2015(UTC)
Posts: 12
Location: Denmark

Thanks: 1 times
Was thanked: 2 time(s) in 2 post(s)
Perfect. Thanks. Works now without any issues.
1 user thanked amvij for this useful post.
Remco on 12/16/2015(UTC)
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.081 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download