Question

So I have this webapp that I've been developing over the last half year or so. Recently I discovered that NancyFx had been upgraded to 0.16 on nuget and went to upgrade (from 0.12). Things went fine, or rather seemed to go fine, on my machine.However in on the CI machine, things went spectacularly wrong. I get the following StackTrace:

2013-02-25 14:28:51:145 - OtherApp - ERROR METHOD - Nancy.TinyIoc.TinyIoCContainer.ConstructType
2013-02-25 14:28:51:145 - OtherApp - ERROR MESSAGE - Unable to resolve type: Nancy.Routing.DefaultRouteResolver

2013-02-25 14:28:51:145 -    at Nancy.TinyIoc.TinyIoCContainer.ConstructType(Type requestedType, Type implementationType, ConstructorInfo constructor, NamedParameterOverloads parameters, ResolveOptions options)
   at Nancy.TinyIoc.TinyIoCContainer.SingletonFactory.GetObject(Type requestedType, TinyIoCContainer container, NamedParameterOverloads parameters, ResolveOptions options)
   at Nancy.TinyIoc.TinyIoCContainer.ResolveInternal(TypeRegistration registration, NamedParameterOverloads parameters, ResolveOptions options)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   at Nancy.Diagnostics.DiagnosticsModuleCatalog.ConfigureContainer(IModuleKeyGenerator moduleKeyGenerator, IEnumerable`1 providers, IRootPathProvider rootPathProvider, IRequestTracing requestTracing, NancyInternalConfiguration configuration, DiagnosticsConfiguration diagnosticsConfiguration)
   at Nancy.Diagnostics.DiagnosticsModuleCatalog..ctor(IModuleKeyGenerator keyGenerator, IEnumerable`1 providers, IRootPathProvider rootPathProvider, IRequestTracing requestTracing, NancyInternalConfiguration configuration, DiagnosticsConfiguration diagnosticsConfiguration)
   at Nancy.Diagnostics.DiagnosticsHook.Enable(DiagnosticsConfiguration diagnosticsConfiguration, IPipelines pipelines, IEnumerable`1 providers, IRootPathProvider rootPathProvider, IEnumerable`1 serializers, IRequestTracing requestTracing, NancyInternalConfiguration configuration, IModelBinderLocator modelBinderLocator, IEnumerable`1 responseProcessors, ICultureService cultureService)
   at Nancy.Diagnostics.DefaultDiagnostics.Initialize(IPipelines pipelines)
   at Nancy.Bootstrapper.NancyBootstrapperBase`1.Initialise()
   at Nancy.Hosting.Self.NancyHost..ctor(INancyBootstrapper bootstrapper, HostConfiguration configuration, Uri[] baseUris)
   at Core.Jobs.HealthMonitorJob.Execute(IJobExecutionContext context)
   at Quartz.Core.JobRunShell.Run()

Now I've tracked the issue down to a particular module which takes a lot of parameters which TinyIoC needs to handle creation for, and if I disable that module, Nancy starts fine, but of course without the necessary functionality. On my machine it works flawlessly. The only discernible difference between the two is that my machine is running Windows 7 while the CI is running Windows Server 2008 R2 Enterprise SP1. Does anyone else have any experience with anything like this happening? It's driving me mad.

Was it helpful?

Solution

The exception should have a tree of InnerException exceptions that should point out the specific type that there is an issue with.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top