title: How can I test that all .dlls required for a .net program are available?
body: <p>I'm trying to test-load all the required .dlls for a C++-CLI program to make sure none are missing, but what looked like a simple method to do this doesn't seem to work:</p>
  
  <pre><code>    // First make sure we have all the .dlls we need
      Assembly^ assembly = Assembly::GetEntryAssembly();
      array&lt;System::Reflection::AssemblyName^&gt;^ referencedAssemblies = assembly-&gt;GetReferencedAssemblies();
      for each(System::Reflection::AssemblyName^ referencedAssemblyName in referencedAssemblies)
      {
          String^ strName = referencedAssemblyName-&gt;Name;
          assembly-&gt;Load(strName);
      }
  </code></pre>
  
  <p>...gives me an exception which says <code>Could not load file or assembly 'System' or one of its dependencies. The system cannot find the file specified.</code></p>