Monday, September 25

unhandled exception of type 'system.typeinitializationexception' in WPF

I was playing around with a Windows Presentation Foundation app and wanted to add Spring.NET to it. I added in the with the references to Spring.Core and Spring.AOP after using NuGet to add them to the project. 
 
   
     

     

   
 

Running the application, it immediately threw a 'System.TypeInitializationException'.

I tried to remove the section name, then the section Group, but the same exception occurred. I gave in and did a search on the exception and StackOverflow had the answer. The startup must be the last section of the App.config file:
 
   
 




No comments: