Daily Usage Issues

CilAssemblyNotFoundException

Started by IanBowyer on 1,978 views

I've just loaded a project up for the first time and I get the following stack trace in ncrunch.

Can anyone direct me in to how to fix this?


NCrunch: If you are experiencing problems in getting this project to build, have a look at http://www.ncrunch.net/documentation/troubleshooting_project-build-issues
NCrunch has encountered an internal error: System.Exception: nCrunch.Compiler.Cil.Utility.CilAssemblyNotFoundException: Unable to resolve assembly: System.Security.Permissions, Version=0.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51
at nCrunch.Compiler.Cil.CilSession.(String , String , UInt16 , UInt16 , UInt16 , UInt16 , String , String  )
at nCrunch.Compiler.Cil.CilSession.LoadAssembly(CilAssemblyReference assemblyReference)
at nCrunch.Compiler.Cil.CilSession.GetReferencedModule(CilModule referencingModule, UInt32 assemblyRefTableRowIndex)
at nCrunch.Compiler.Cil.AssemblyIdentity.CilAssemblyRefTable.GetAssemblyModuleByRowIndex(UInt32 tableIndex)
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeDefTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilExportedTypeTable.GetTypeById(UInt64 typeId)
at nCrunch.Compiler.Cil.Types.CilTypeReference.ResolveDefinition(CilModule runtimeSystemLibrary)
at nCrunch.Compiler.Cil.Methods.CilMemberReference.ResolveDeclaringType()
at nCrunch.Compiler.Cil.CustomAttributes.CilCustomAttribute..(CilMemberReference )
at nCrunch.Compiler.Cil.CustomAttributes.CilCustomAttribute.[T](Func`2 , Func`2 )
at nCrunch.Module.MSTest.Integration.MSTestCilDiscoverer.identifyTestMethodType(CilMethodDefinition method)
at nCrunch.Module.MSTest.Integration.MSTestCilDiscoverer.<FindFrameworkTestsInAssembly>b__12_0()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Module.MSTest.Integration.MSTestCilDiscoverer.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.Compiler.StaticManipulation.BuiltCilAssembly.DiscoverTests(TestFrameworkDescription[] applicableTestFrameworks, ComponentUniqueName testComponentUniqueName)
at nCrunch.Compiler.CilProcessingTasks.CilTestDiscoveryTask.ProcessTask(IBuiltAssembly builtAssembly, ComponentInstrumentationParameters instrumentationParameters, BuildOutput output)
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.()
at nCrunch.Compiler.CilProcessingTasks.ConcurrentCilTaskProcessor.ProcessTasks(Int32 backgroundThreadsAllowed)
at nCrunch.Compiler.RemoteBuildRunner.(ComponentInstrumentationParameters , BuildOutput , IBackgroundTaskProcessor )
at nCrunch.Compiler.RemoteBuildRunner.PerformPostProcessingOfBuiltAssembly(ComponentInstrumentationParameters instrumentationParameters, BuildOutput output, IBackgroundTaskProcessor backgroundTaskProcessor)
at nCrunch.Core.BuildManagement.BuildEnvironment..()
at nCrunch.Common.PerformanceTracking.PerfTracker.TrackActivity(String name, Action activity)
at nCrunch.Core.BuildManagement.BuildEnvironment.Build(SnapshotComponent snapshotComponentToBuild, IList`1 referencedComponents, GridClientId gridClientId, IList`1 customEnvironmentVariables, IPlatformBuildExtender extender, Guid taskId, GridClientDescription clientDescription, Boolean extractCoverageReportStructure)
Hi, thanks for sharing this issue.

Can you confirm if setting your 'Framework utilisation type for MSTest' to 'DynamicAnalysis' works around the problem?
Thank you that worked. I knew there would be a setting somewhere I just couldn't find it.
IanBowyer wrote:Thank you that worked. I knew there would be a setting somewhere I just couldn't find it.


Thanks for confirming this. We do have a fix pending for this issue which will be out with the next release. I'd suggest staying with DynamicAnalysis for now.

Post a reply

Log in to reply.