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

Notification

Icon
Error

Build Fails in NCrunch for depencies but not in VS
Martina
#1 Posted : Thursday, March 21, 2019 8:31:30 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/21/2019(UTC)
Posts: 2
Location: United Kingdom

Hi,

I have a solution with several projects in, of which only one is a test project. The sln builds fine in VS and tests are passing, though NCrunch seems to be stuck looking for dependencies in a different workspace. There are 22 tests failing due to to a build failed.

The file path in bold is not correct. Is there a way for me to reset and restart NCruch in order to get rid of these errors? If by restarting it would find automatically the right workspace
I tried with 'Restart the NCrunch engine and resynchronize with VS and rebuild project' button, on the test window. But nothing changes.

Thank you

System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Web.Mvc, Version=5.2.7.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' ---> System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Users\MartinaNatale\AppData\Local\NCrunch\10412\39\_ncrunchreferences\System.Web.Mvc.dll' or one of its dependencies. The system cannot find the file specified.
File name: 'file:///C:\Users\MartinaNatale\AppData\Local\NCrunch\10412\39\_ncrunchreferences\System.Web.Mvc.dll'
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
Remco
#2 Posted : Thursday, March 21, 2019 9:57:53 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 posting.

When NCrunch processes your project, it will shadow copy it into a background workspace and redirect most references in this project to an _ncrunchreferences directory inside that workspace. So the path above doesn't necessarily look wrong, but it's concerning that the file doesn't seem to exist where it's supposed to.

Is there more to the stack trace above that might show which component is attempting to load the assembly?

Can you tell me any more about how your project is referencing the assembly? Is this done via a Nuget package? Is the System.Web.Mvc.dll file referenced from a path under your solution directory?
Martina
#3 Posted : Monday, March 25, 2019 7:53:54 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/21/2019(UTC)
Posts: 2
Location: United Kingdom

Thanks for getting back to me.

No, the stack trace hasn't got any more, it keeps going on about Nuget packages missing.
In fact, the references that it keeps looking for are all declared in the csproj file and have been added as references in each project.

I did carry on writing tests with NCrunch disabled for about one hour. Restarted the machine again and VS and it seemed to have forgotten about that file path XD I don't even know if there is a logical explanation, though it is working fine now. Thanks
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.034 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download