Hi Remco,
Thank you for your solutions, unfortunately I cannot debug the test or force load the libraries in initialize. I was only looking at the failed test node error, and it seems the failure is not at the test level, but at the test project level. Here's the 'Analysis failure' error for that test project:
An error occurred while analysing this project after it was built: System.IO.FileNotFoundException: Could not load file or assembly 'MyAssembly.x86, Version=0.0.0.0, Culture=neutral, PublicKeyToken=222' or one of its dependencies. The specified module could not be found.
File name: 'MyAssembly.x86, Version=0.0.0.0, Culture=neutral, PublicKeyToken=222' ---> System.IO.FileNotFoundException: Could not load file or assembly 'MyAssembly.x86.dll' or one of its dependencies. The specified module could not be found.
File name: 'MyAssembly.x86.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)
at System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean suppressSecurityChecks)
at System.Reflection.RuntimeAssembly.InternalLoadFrom(String assemblyFile, Evidence securityEvidence, Byte[] hashValue, AssemblyHashAlgorithm hashAlgorithm, Boolean forIntrospection, Boolean suppressSecurityChecks, StackCrawlMark& stackMark)
at System.Reflection.Assembly.LoadFrom(String assemblyFile)
at nCrunch.Common.CustomAssemblyResolver.resolveAssemblyFrom(IEnumerable`1 possibleAssemblyPaths, ParsedAssemblyName parsedAssemblyName)
at nCrunch.Common.CustomAssemblyResolver.ResolveAssembly(ParsedAssemblyName parsedAssemblyName)
at nCrunch.Common.CustomAssemblyResolver.AssemblyResolve(Object sender, ResolveEventArgs args)
at System.AppDomain.OnAssemblyResolveEvent(RuntimeAssembly assembly, String assemblyFullName)
at System.Signature.GetSignature(Void* pCorSig, Int32 cCorSig, RuntimeFieldHandleInternal fieldHandle, IRuntimeMethodInfo methodHandle, RuntimeType declaringType)
at System.Reflection.RuntimeMethodInfo.FetchNonReturnParameters()
at System.Reflection.RuntimeMethodInfo.GetParameters()
at nCrunch.TestExecution.Reflection.Clr.ClrMethod.get_ParameterTypes()
at nCrunch.TestExecution.Reflection.ReflectedMethod.GetMemberIdentifier()
at nCrunch.TestExecution.Reflection.ReflectedType.()
at nCrunch.TestExecution.Reflection.ReflectedType.get_MethodsWithInheritance()
at nCrunch.Module.MSTest.Integration.MSTestDynamicDiscoverer.<>c__DisplayClass5_0.<FindFrameworkTestsInAssembly>b__1()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Common.PerformanceTracking.PerfTracker.TryTrackActivity(String name, Action activity)
at nCrunch.Module.MSTest.Integration.MSTestDynamicDiscoverer.FindFrameworkTestsInAssembly(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.TestExecution.TestFinder.FindTestsForFrameworks(ReflectedAssembly assembly, FilePath assemblyFilePath, IList`1 referencedAssemblyFilePaths, DescribedTestFrameworkDiscoverer[] describedDiscoverers, ComponentUniqueName testComponentUniqueName, PlatformType platformType, DynamicProxy[] dynamicProxies)
at nCrunch.TestExecution.RemoteTaskRunner.AnalyseAssembly(DescribedTestFrameworkDiscoverer[] applicableFrameworks, ComponentUniqueName testComponentUniqueName, PerfTracker perfTracker, TaskLogId taskLogId)
I tried enabling 'Copy referenced assemblies to workspace'. But I get the same error.
The nuget package I use that provides the native libraries is structured a lot like this one:
https://www.nuget.org/pa...Lite.Core.NetFramework/ At build, this will add a x86 and x64 subfolders in bin output and they will contain their respective platform specific assemblies. You can see the copy magic in the .targets file.
What can I do for such scenario?
Thanks,
Alex