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 NCrunch Developer
#7911
02 Nov 2015 21:17 UTC
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).
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).
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.
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 NCrunch Developer
#7913
03 Nov 2015 09:27 UTC
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.
Unfortunately couldn't submit due to proxy/firewall issues. Could I send the report to some email?
Remco NCrunch Developer
#7915
03 Nov 2015 10:55 UTC
You can upload using the contact form - https://www.ncrunch.net/support/contact
Hi,
I have uploaded the report using the contact form. The issue still persist after 2.18!!
Do you still need some info?
Thanks.
I have uploaded the report using the contact form. The issue still persist after 2.18!!
Do you still need some info?
Thanks.
Remco NCrunch Developer
#8005
16 Nov 2015 09:43 UTC
Hi,
Sorry I haven't received anything via the contact form. When was the file sent? Was it particularly large?
Sorry I haven't received anything via the contact form. When was the file sent? Was it particularly large?
I tried uploading once again, did you get that now?
Remco NCrunch Developer
#8008
16 Nov 2015 11:59 UTC
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.
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.
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?
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?
Now I see something weird... I reverted to version NCrunch v2.16 (Released 10 Aug 2015), and it works perfectly fine...
Remco NCrunch Developer
#8011
16 Nov 2015 22:14 UTC
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 :)
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 :)
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.
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 NCrunch Developer
#8015
17 Nov 2015 21:57 UTC
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.
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.
Thanks! I do as you suggest... Would wait for next release.
Remco NCrunch Developer
#8131
16 Dec 2015 03:22 UTC
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.
Perfect. Thanks. Works now without any issues.
Post a reply
Log in to reply.