Build/Test Issues

NotImplementedException building one project

Started by samholder on 4,353 views

I have started to get this exception when we are building one of our projects.

It is a test project and because of it we can't run the tests:

System.NotImplementedException: 26
at Mono.Cecil.SignatureReader.GetPrimitiveType(ElementType etype)
at Mono.Cecil.SignatureReader.ReadTypeSignature(ElementType etype)
at Mono.Cecil.SignatureReader.ReadGenericInstanceSignature(IGenericParameterProvider provider, IGenericInstance instance)
at Mono.Cecil.MetadataReader.ReadMethodSpecSignature(UInt32 signature, MethodReference method)
at Mono.Cecil.MetadataReader.GetMethodSpecification(UInt32 rid)
at Mono.Cecil.MetadataReader.LookupToken(MetadataToken token)
at Mono.Cecil.Cil.CodeReader.ReadOperand(Instruction instruction)
at Mono.Cecil.Cil.CodeReader.ReadCode()
at Mono.Cecil.Cil.CodeReader.ReadFatMethod()
at Mono.Cecil.Cil.CodeReader.ReadMethodBody()
at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
at Mono.Cecil.MethodDefinition.<get_Body>b__2(MethodDefinition method, MetadataReader reader)
at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TItem item, Func`3 read)
at Mono.Cecil.MethodDefinition.get_Body()
at #=qHd2lKVaL7lyQhbS8qJLu5CZSYgyhPe29Sf$r_OIDKkb9KDtes9hfpoB9yDKyEKnV61qSRh23SKYjGTs6ih6zGw==.#=qqrR$lxvLcvqiT9vBEsBdE_t0dQuh3zn5XKLxG3rsVR0=(Collection`1 #=qIcAblTV9pBjo8KK$W3HbIw==)
at #=qHd2lKVaL7lyQhbS8qJLu5CZSYgyhPe29Sf$r_OIDKkb9KDtes9hfpoB9yDKyEKnV61qSRh23SKYjGTs6ih6zGw==.#=q3QKAIGGnmUmDiUzaCIBI8KjcO8H7ItbB$PeTvnawjOg=(IEnumerable`1 #=q3F3O5S$SHobR2U4KN7M5hQ==)
at #=qHd2lKVaL7lyQhbS8qJLu5CZSYgyhPe29Sf$r_OIDKkb9KDtes9hfpoB9yDKyEKnV61qSRh23SKYjGTs6ih6zGw==.#=q3QKAIGGnmUmDiUzaCIBI8KjcO8H7ItbB$PeTvnawjOg=(IEnumerable`1 #=q3F3O5S$SHobR2U4KN7M5hQ==)
at #=qHd2lKVaL7lyQhbS8qJLu5CZSYgyhPe29Sf$r_OIDKkb9KDtes9hfpoB9yDKyEKnV61qSRh23SKYjGTs6ih6zGw==.#=qLOEZlhT9htS5BtvjYe$FLlqqHWQ$Z_apLqI4lSblJIM=()
at nCrunch.Compiler.StaticManipulation.BuiltAssembly.Instrument(ComponentSourceLineMap sourceLineMap, IDictionary`2 instrumentationDirectivesByCodeFileId, IDictionary`2 codeFileIDsByFilePath, Boolean proxyProcessIsActive, Int32 componentId, IInstrumentationFilter[] instrumentationFilters)
at nCrunch.Compiler.RemoteBuildRunner.#=q4T4Wku0mED4YDvedRpeyz_2jt5uPMInV0R3DfR86f3c=(ComponentBuildParameters #=qTPEt6YAyidxf_L4ww4ChDA==, String #=qWDBvjmmfEZ8j1h963p6lmGzcbN6Dlb9cOA3leLP1XGY=, BuildOutput #=qWzOeAOYzHeWDhsgs$NGAjg==, String #=qOXFr_mE6VSdHIW1zprK53fiJ3eK5$HW4HHcweOrncwk=, String[] #=qeTb4VaubG05DdrxYg7GkE2y9_pNGdfDdrHn7kMmO5ns=)
at nCrunch.Compiler.RemoteBuildRunner.Build(ComponentBuildParameters parameters)

Any ideas? Is this in our code? Or in NCrunch? Can I do more to help track this down?

Edited

Hi,

This is an exception thrown by a library that NCrunch uses to perform its instrumentation. You somehow seem to have discovered a primitive type or IL sequence that this library hasn't been designed to handle.

Can you tell me a bit more about this project? Is it written in C#? Are there any parts of the project that make use of complicated/rare syntax or niche compiler features? If there's any way I can get hold of the code that's causing this to explode (or the DLL derived from this code), I should have a good chance at being able to fix it.

As this is a test project, you may have some luck with commenting out or removing large parts of the project in order to deduct which class is causing the problem. Judging from the stack trace, the offending code is making use of a generic type ...

To a certain extent, it may be possible to work around the problem by turning off the 'Instrument output assembly' configuration option for this project, and making sure that the test framework you are using is set to use 'DynamicAnalysis' in the NCrunch solution configuration. Unfortunately you will then lose code coverage for the test project.


Cheers,

Remco

Post a reply

Log in to reply.