WcfSvcHost encountered a critical error and must exit

When I was trying to run one of my developer's WCF Service I got the following error and also the solution below.

Error details - WcfSvcHost encountered a critical error and must exit. This may be caused by invalid configuration file. Please inspect additional information below for detail. System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.    at System.Reflection.RuntimeModule.GetTypes(RuntimeModule module)    at System.Reflection.Assembly.GetTypes()    at Microsoft.Tools.SvcHost.ServiceHostHelper.LoadServiceAssembly(String svcAssemblyPath)

Solution:

I managed to fix the problem as one of the project was set to x86 and others were set to Any CPU. Changing all to Any CPU fixed the problem for me.

WcfSvcHost encountered a critical error and must exit.

Cheers!