How can I check if dll is .net library "The module was expected to contain an assembly manifest." <p>How can I verify if dll was wrote in .net? I'm using code as below:</p> <pre><code>Assembly assembly = null; try { foreach (string fileName in Directory.GetFiles(Environment.CurrentDirectory.ToString(), "*.dll", SearchOption.TopDirectoryOnly)) { try { assembly = Assembly.LoadFrom(fileName); Console.WriteLine(fileName); } catch (Exception ex) { ... } finally { ... } } } catch (ReflectionTypeLoadException ex) { .. } </code></pre> <p>When I want to load <code>assembly = Assembly.LoadFrom(fileName)</code> non-.net dll, an exception will appear:</p> <blockquote> <p>Could not load file or assembly 'file:///...' or one of its dependencies. The module was expected to contain an assembly manifest.</p> </blockquote> <p>I want to use verify in if-else clause. Can you help me? </p>