DarthFubuMVC/fubumvc-diagnostics — Issue #1: Diagnostics seems broken by REST changes
Author: KevM
Created: 2011-10-14 21:04:53+00:00
State: open

Added the advanced diagnostics nuget to an existing project and got this bootstrapping error.

```
Lambda expression at: FubuMVC.Core.FubuApplication+<>c__DisplayClassc.b__9(), line 0
Applying extension FubuMVC.Diagnostics.Core.AdvancedDiagnosticsFubuExtension
Applying extension FubuMVC.Diagnostics.AdvancedDiagnosticsRegistry
Applying extension FubuMVC.Spark.SparkEngine
System.NullReferenceException: Object reference not set to an instance of an object.
at Dovetail.Agent.Mobile.Configuration.CrudJsonOutputPolicy.b__0(BehaviorChain x) in C:\projects\mobile\source\Dovetail.Agent.Mobile\Configuration\CrudExtension.cs:line 36
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction) in d:\Builds\FubuCore\src\FubuCore\EnumerableExtensions.cs:line 76
at Dovetail.Agent.Mobile.Configuration.CrudJsonOutputPolicy.Configure(BehaviorGraph graph) in C:\projects\mobile\source\Dovetail.Agent.Mobile\Configuration\CrudExtension.cs:line 35
at FubuMVC.Core.Registration.Nodes.BehaviorExtensions.<>c__DisplayClass1.b__0(IConfigurationAction x) in d:\Builds\FubuMVC\src\FubuMVC.Core\Registration\Nodes\BehaviorExtensions.cs:line 9
at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction) in d:\Builds\FubuCore\src\FubuCore\EnumerableExtensions.cs:line 78
at FubuMVC.Core.Registration.Nodes.BehaviorExtensions.Configure(List`1 actions, BehaviorGraph graph) in d:\Builds\FubuMVC\src\FubuMVC.Core\Registration\Nodes\BehaviorExtensions.cs:line 9
at FubuMVC.Core.FubuRegistry.BuildGraph() in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuRegistry.cs:line 162
at FubuMVC.Core.FubuApplication.<>c__DisplayClassc.<>c__DisplayClasse.b__b(IPackageLog log) in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuApplication.cs:line 119
at Bottles.LambdaBootstrapper.Bootstrap(IPackageLog log)
at Bottles.PackagingRuntimeGraph.<>c__DisplayClass4.b__3(IBootstrapper b)
at Bottles.Diagnostics.PackagingDiagnosticsExtensions.<>c__DisplayClass2`1.<>c__DisplayClass4.b__1()
at Bottles.Diagnostics.PackageLog.Execute(Action continuation)

------------------------------------------------------------------------------------------------
]
Bottles.PackageRegistry.b__a() +210
Bottles.PackageRegistry.AssertNoFailures(Action failure) +33
Bottles.PackageRegistry.AssertNoFailures() +66
FubuMVC.Core.FubuApplication.Bootstrap() in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuApplication.cs:130
FubuMVC.Core.FubuApplication.Bootstrap(IList`1 routes) in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuApplication.cs:80
Dovetail.Agent.Mobile.Bootstrapper.BootstrapAll() in C:\projects\mobile\source\Dovetail.Agent.Mobile\Bootstrapper.cs:25
Dovetail.Agent.Mobile.Bootstrapper.Bootstrap(IList`1 routes) in C:\projects\mobile\source\Dovetail.Agent.Mobile\Bootstrapper.cs:33
Dovetail.Agent.Mobile.GlobalApplication.Application_Start() in C:\projects\mobile\source\Dovetail.Agent.Mobile\Global.asax.cs:9

[HttpException (0x80004005): Package loading and application bootstrapping failed

Lambda expression at: FubuMVC.Core.FubuApplication+<>c__DisplayClassc.b__9(), line 0
Applying extension FubuMVC.Diagnostics.Core.AdvancedDiagnosticsFubuExtension
Applying extension FubuMVC.Diagnostics.AdvancedDiagnosticsRegistry
Applying extension FubuMVC.Spark.SparkEngine
System.NullReferenceException: Object reference not set to an instance of an object.
at Dovetail.Agent.Mobile.Configuration.CrudJsonOutputPolicy.b__0(BehaviorChain x) in C:\projects\mobile\source\Dovetail.Agent.Mobile\Configuration\CrudExtension.cs:line 36
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction) in d:\Builds\FubuCore\src\FubuCore\EnumerableExtensions.cs:line 76
at Dovetail.Agent.Mobile.Configuration.CrudJsonOutputPolicy.Configure(BehaviorGraph graph) in C:\projects\mobile\source\Dovetail.Agent.Mobile\Configuration\CrudExtension.cs:line 35
at FubuMVC.Core.Registration.Nodes.BehaviorExtensions.<>c__DisplayClass1.b__0(IConfigurationAction x) in d:\Builds\FubuMVC\src\FubuMVC.Core\Registration\Nodes\BehaviorExtensions.cs:line 9
at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction) in d:\Builds\FubuCore\src\FubuCore\EnumerableExtensions.cs:line 78
at FubuMVC.Core.Registration.Nodes.BehaviorExtensions.Configure(List`1 actions, BehaviorGraph graph) in d:\Builds\FubuMVC\src\FubuMVC.Core\Registration\Nodes\BehaviorExtensions.cs:line 9
at FubuMVC.Core.FubuRegistry.BuildGraph() in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuRegistry.cs:line 162
at FubuMVC.Core.FubuApplication.<>c__DisplayClassc.<>c__DisplayClasse.b__b(IPackageLog log) in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuApplication.cs:line 119
at Bottles.LambdaBootstrapper.Bootstrap(IPackageLog log)
at Bottles.PackagingRuntimeGraph.<>c__DisplayClass4.b__3(IBootstrapper b)
at Bottles.Diagnostics.PackagingDiagnosticsExtensions.<>c__DisplayClass2`1.<>c__DisplayClass4.b__1()
at Bottles.Diagnostics.PackageLog.Execute(Action continuation)

------------------------------------------------------------------------------------------------
]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +9160125
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +131
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +194
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +339
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +253

[HttpException (0x80004005): Package loading and application bootstrapping failed

Lambda expression at: FubuMVC.Core.FubuApplication+<>c__DisplayClassc.b__9(), line 0
Applying extension FubuMVC.Diagnostics.Core.AdvancedDiagnosticsFubuExtension
Applying extension FubuMVC.Diagnostics.AdvancedDiagnosticsRegistry
Applying extension FubuMVC.Spark.SparkEngine
System.NullReferenceException: Object reference not set to an instance of an object.
at Dovetail.Agent.Mobile.Configuration.CrudJsonOutputPolicy.b__0(BehaviorChain x) in C:\projects\mobile\source\Dovetail.Agent.Mobile\Configuration\CrudExtension.cs:line 36
at System.Linq.Enumerable.WhereListIterator`1.MoveNext()
at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction) in d:\Builds\FubuCore\src\FubuCore\EnumerableExtensions.cs:line 76
at Dovetail.Agent.Mobile.Configuration.CrudJsonOutputPolicy.Configure(BehaviorGraph graph) in C:\projects\mobile\source\Dovetail.Agent.Mobile\Configuration\CrudExtension.cs:line 35
at FubuMVC.Core.Registration.Nodes.BehaviorExtensions.<>c__DisplayClass1.b__0(IConfigurationAction x) in d:\Builds\FubuMVC\src\FubuMVC.Core\Registration\Nodes\BehaviorExtensions.cs:line 9
at System.Collections.Generic.GenericEnumerableExtensions.Each[T](IEnumerable`1 values, Action`1 eachAction) in d:\Builds\FubuCore\src\FubuCore\EnumerableExtensions.cs:line 78
at FubuMVC.Core.Registration.Nodes.BehaviorExtensions.Configure(List`1 actions, BehaviorGraph graph) in d:\Builds\FubuMVC\src\FubuMVC.Core\Registration\Nodes\BehaviorExtensions.cs:line 9
at FubuMVC.Core.FubuRegistry.BuildGraph() in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuRegistry.cs:line 162
at FubuMVC.Core.FubuApplication.<>c__DisplayClassc.<>c__DisplayClasse.b__b(IPackageLog log) in d:\Builds\FubuMVC\src\FubuMVC.Core\FubuApplication.cs:line 119
at Bottles.LambdaBootstrapper.Bootstrap(IPackageLog log)
at Bottles.PackagingRuntimeGraph.<>c__DisplayClass4.b__3(IBootstrapper b)
at Bottles.Diagnostics.PackagingDiagnosticsExtensions.<>c__DisplayClass2`1.<>c__DisplayClass4.b__1()
at Bottles.Diagnostics.PackageLog.Execute(Action continuation)

```