Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

When running your application on another machine are you getting the following error ‘Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.’? Most of the time this is due to a dll or other piece of code not being included in the build file and it doesn’t exist on the new machine. To find out which piece of code is missing you can use the following code :

NOTE: in the following code, logger is a NLog logger object.

Now all you have to do is look at your error log to see which dll’s are missing and make sure that they are being added into your build.

Mike GriffithUnable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.