title: NES (.NET Event Sourcing) sample exception (using NServiceBus 2.0)
body: <p>I'm using the NES sample which works out of the box. Then I have swapped the NServiceBus 2.5 version with an older 2.0 but this results in the following error when starting the MVC application:</p>
  
  <p>"Object reference not set to an instance of an object."
     at NES.EventConverterFactory..ctor()
     at NES.DI.&lt;.cctor>b_<em>6() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DI.cs:line 24
     at NES.DependencyInjectionContainer.ResolveTService in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
     at NES.DependencyInjectionContainer.&lt;>c</em>_DisplayClass4<code>2.&lt;Register&gt;b__3() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 45
     at NES.DependencyInjectionContainer.Resolve[TService]() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
     at NES.DependencyInjectionContainer.&lt;&gt;c__DisplayClassa</code>4.b_<em>9() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 59
     at NES.DependencyInjectionContainer.ResolveTService in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
     at NES.DependencyInjectionContainer.&lt;>c</em>_DisplayClass4`2.b__3() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 45
     at NES.DependencyInjectionContainer.ResolveTService in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\DependencyInjectionContainer.cs:line 20
     at NES.UnitOfWorkFactory.Begin() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\UnitOfWorkFactory.cs:line 18
     at NES.NServiceBus.MessageModule.HandleBeginMessage() in C:\Users\werner\Downloads\elliotritchie-NES-9a56ad8\elliotritchie-NES-9a56ad8\src\NES\NServiceBus\MessageModule.cs:line 10
     at NServiceBus.Unicast.UnicastBus.TransportStartedMessageProcessing(Object sender, EventArgs e)
     at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.ReceiveFromQueue()
     at NServiceBus.Unicast.Transport.Msmq.MsmqTransport.Process()</p>
  
  <p>Now this happens when the Global.asax.cs hits "AreaRegistration.RegisterAllAreas();". In the end, the error occurs in "EventConverterFactory.cs" line 13 where the static constructor tries to iterate "Global.TypesToScan" which is null.</p>
  
  <p>Does anyone know how to get this sample going? It is odd that the exact same code seem to work with NSB 2.5 assemblies...</p>
  
  <p>Werner</p>