While I was working on some code today and found that some NuGet packages where out of date. So I went to update tab in Manage NuGet packages window and updated all of them. MySql.Data package (not important which package, just an example) was also updated in that from version 6.7.8 to current / latest (6.9.6). I tried to run the application to test the updates made in referring packages. I encountered following error: TypeInitializationException was unhandled An unhandled exception of type 'System.TypeInitializationException' occurred in Unknown Module. Additional information: The type initializer for '[Application Name]' threw an exception. Looking at this exception, it doesn't seems to be obvious what is going wrong here. There isn't even option for "View details". Many of you may get stuck on this and spent hours before you figure out that the AssemblyBinding.dependentAssembly.bindingRedirect are » Read more

 Jsinh        

In programming world everything is not a piece of cake. At times you need to do things more than available out-of-the-box. One of the common thing you seems to do is to modify or access your application’s configuration. There are two type of configuration files: App.Config (Used by Windows Project type application) Web.Config (Used by Web Project type application) We do lots of dirty stuffs to get the path and name of the file that is main configuration for the windows or web application. The simplest way to access the configuration file associated with the currently running application is using: System.AppDomain.CurrentDomain.SetupInformation.ConfigurationFile Verified against: Windows Forms, Console Application, WPF Application, ASP.NET MVC 3 application. » Read more

 Jsinh