title: C# - Loading DLL Dynamic - System.Reflection.ReflectionTypeLoadException: Unable to load one or more of the requested types
body: <p>In C#, while loading DLL from folder using the below code getting these below stack trace, when tried to get the types.</p>
  
  <pre><code>var assembly = Assembly.LoadFile(assemblyInfo.FullName); // assembly loads perfectly using the absolute path.
  var types = assembly.GetTypes(); // this line throws the below stacktrace.
  </code></pre>
  
  <p>Stack trace:</p>
  
  <pre><code>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()
  </code></pre>
  
  <p>I also have checked existing solutions: <a href="https://stackoverflow.com/questions/1091853/error-message-unable-to-load-one-or-more-of-the-requested-types-retrieve-the-l">Error message &#39;Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.&#39;</a>, <a href="https://stackoverflow.com/questions/18362368/loading-dlls-at-runtime-in-c-sharp">Loading DLLs at runtime in C#</a> (didn't work)</p>