Recently while doing some conversions with Automapper I ran into an error while running it. I was getting the “The type initializer for ‘AutoMapper.TypeMapFactory’ threw an exception.” with an inner exception of “This type is not supported on this platform IDictionaryFactory”. After doing some debugging I finally figured out that it was due to the Automapper dll itself not being copied over during the build process in Visual Studio. After making sure that the dll was copied correctly it fixed the issue.
For some reason Visual Studio occasionally has issues with copying over the dlls that should be copied over. Please note this occurred with Visual Studio 2012.