c# - coiniumServ works on windows, fails on mono at runtime with System.Reflection.ReflectionTypeLoadException -


i've started working on coiniumserv code. code run on windows, on linux server fails.

stack trace:

nancy.tinyioc.tinyiocresolutionexception:  unable resolve type:      coiniumserv.server.web.webserver --->          nancy.tinyioc.tinyiocresolutionexception: unable resolve type:              coiniumserv.server.web.nancybootstrapper --->                  system.typeinitializationexception: exception thrown type initializer nancy.bootstrapper.assemblytypescanner --->                  system.reflection.reflectiontypeloadexception: classes in module cannot loaded.                    @ (wrapper managed-to-native) system.reflection.assembly:gettypes (system.reflection.assembly,bool)                   @ system.reflection.assembly.getexportedtypes () [0x00000] in <filename unknown>:0                   @ nancy.extensions.assemblyextensions.safegetexportedtypes (system.reflection.assembly assembly) [0x00000] in <filename unknown>:0                   @ nancy.bootstrapper.appdomainassemblytypescanner.<updatetypes>b__16 (system.reflection.assembly assembly) [0x00000] in <filename unknown>:0                   @ system.linq.enumerable+<createselectmanyiterator>c__iterator14`3[system.reflection.assembly,system.type,<>f__anonymoustype0`2[system.reflection.assemb]].movenext () [0x00000] in <filename unknown>:0                   @ system.linq.enumerable+<createwhereiterator>c__iterator1e`1[<>f__anonymoustype0`2[system.reflection.assembly,system.type]].movenext () [0x00000] in <fn>:0                   @ system.linq.enumerable+<createselectiterator>c__iterator10`2[<>f__anonymoustype0`2[system.reflection.assembly,system.type],system.type].movenext () [0lename unknown>:0                   @ system.linq.enumerable.toarray[type] (ienumerable`1 source) [0x00000] in <filename unknown>:0                   @ nancy.bootstrapper.appdomainassemblytypescanner.updatetypes () [0x00000] in <filename unknown>:0                   @ nancy.bootstrapper.appdomainassemblytypescanner.loadassemblieswithnancyreferences () [0x00000] in <filename unknown>:0                   @ nancy.bootstrapper.appdomainassemblytypescanner..cctor () [0x00000] in <filename unknown>:0                   --- end of inner exception stack trace ---              @ nancy.conventions.nancyconventions.builddefaultconventions () <0x0002f>             @ nancy.conventions.nancyconventions..ctor () <0x00013>             @ nancy.bootstrapper.nancybootstrapperbase`1<nancy.tinyioc.tinyioccontainer>..ctor () <0x0005f>             @ nancy.bootstrapper.nancybootstrapperwithrequestcontainerbase`1<nancy.tinyioc.tinyioccontainer>..ctor () <0x00087>             @ nancy.defaultnancybootstrapper..ctor () <0x00013>             @ coiniumserv.server.web.nancybootstrapper..ctor (coiniumserv.container.context.iapplicationcontext,coiniumserv.statistics.istatisticsmanager,coiniumserv.pools.ipoolmanager,coiniumserv.configuration.iconfigmanager) <0x00033>             @ (wrapper dynamic-method) object.lambda_method (system.runtime.compilerservices.closure,object[]) <0x00357>             @ nancy.tinyioc.tinyioccontainer.constructtype (system.type,system.type,system.reflection.constructorinfo,nancy.tinyioc.namedparameteroverloads,nancy.tinyioc.resolveoptions) <0x003fe>        --- end of inner exception stack trace ---       @ nancy.tinyioc.tinyioccontainer.constructtype (system.type requestedtype, system.type implementationtype, system.reflection.constructorinfo constructor, nancy.tinyioc.namedparameteroverloads parameters, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0       @ nancy.tinyioc.tinyioccontainer.constructtype (system.type requestedtype, system.type implementationtype, system.reflection.constructorinfo constructor, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0       @ nancy.tinyioc.tinyioccontainer+singletonfactory.getobject (system.type requestedtype, nancy.tinyioc.tinyioccontainer container, nancy.tinyioc.namedparameteroverloads parameters, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0       @ nancy.tinyioc.tinyioccontainer.resolveinternal (nancy.tinyioc.typeregistration registration, nancy.tinyioc.namedparameteroverloads parameters, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0   --- end of inner exception stack trace ---   @ nancy.tinyioc.tinyioccontainer.constructtype (system.type requestedtype, system.type implementationtype, system.reflection.constructorinfo constructor, nancy.tinyioc.namedparameteroverloads parameters, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0   @ nancy.tinyioc.tinyioccontainer.constructtype (system.type requestedtype, system.type implementationtype, system.reflection.constructorinfo constructor, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0   @ nancy.tinyioc.tinyioccontainer+singletonfactory.getobject (system.type requestedtype, nancy.tinyioc.tinyioccontainer container, nancy.tinyioc.namedparameteroverloads parameters, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0   @ nancy.tinyioc.tinyioccontainer.resolveinternal (nancy.tinyioc.typeregistration registration, nancy.tinyioc.namedparameteroverloads parameters, nancy.tinyioc.resolveoptions options) [0x00000] in <filename unknown>:0 

the files/classes included in build file , listed during compile. there couple of warning thrown during compile,but in reference unused variables in code. i've checked referenced dll's being copied. i've tried deleting packages pulled nuget, , running manual clean before build.

i'm not c# person, i'm not sure go here.

[edit] windows version build visualstudio, linux built on linux box via mono ( xbuild )

just in case pulls in search, i'm posting answer.

the mono on linux build not generating bunch of .xml configuration files.

this answer pointed me in right direction: http://forum.unity3d.com/threads/ideas-reflectiontypeloadexception-the-classes-in-the-module-cannot-be-loaded.230389/

comparing build output on linux build output on windows showed missing files. going easy route, copied files windows linux , ran.

it know pure linux pov. i'll add comments if find gets left out in linux build instructions.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -