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

Notification

Icon
Error

Using NCrunch console on network drive results in ERROR (Internal).
GreenMoose
#1 Posted : Friday, March 31, 2017 12:54:20 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 6/17/2012(UTC)
Posts: 507

Thanks: 145 times
Was thanked: 66 time(s) in 64 post(s)
So, since we don't have NCrunch Console on Nuget yet I tried using NCrunch from a network location (using \\UNC\sharedPath and f:\MappedPath resulted in same error) I got below results:
Quote:

[14:45:17.344-Core-8] Loading module: f:\Modules\MSTest\nCrunch.Module.MSTest.crunchmodule
[14:45:17.3752-Core-8] ERROR (Internal): An exception thrown while processing the module 'f:\Modules\MSTest\nCrunch.Module.MSTest.crunchmodule': System.IO.FileLoadException: Could not load file or assembly 'fil
e:///f:\Modules\MSTest\nCrunch.Module.MSTest.dll' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
File name: 'file:///f:\Modules\MSTest\nCrunch.Module.MSTest.dll' ---> System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be san
dboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly,
please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.
at System.Reflection.RuntimeAssembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly locationHint, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOn
FileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean thro
wOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurity
Checks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at nCrunch.Core.ModuleManagement.ModuleLoader.LoadModules(IList`1 additionalSearchPaths)



(Robocopying same directory into a subdir on local computer as a pre-build step resolved it)
Remco
#2 Posted : Friday, March 31, 2017 10:40:40 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 960 times
Was thanked: 1290 time(s) in 1196 post(s)
This is caused by a constraint imposed by the .NET Framework. Basically, .NET doesn't allow the dynamic loading of assemblies from network locations without special configuration. It's possible that adding the loadFromRemoteSources switch would resolve this immediate problem, but NCrunch employs dynamic loading at so many levels in its architecture and across so many processes that I think you're bound to hit further downstream problems when attempting to do this. At the moment this isn't a supported use case. I recommend copying the files over before running the tool. If necessary, you could just use a script to copy them over for each execution run. The console tool isn't large (<20MB).
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.029 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download