internal void Check() { if (Assemblies.Count == 0) { CollectAssemblies(RootPath, true); } foreach (AssemblyName assemblyName in Assemblies) { if (ExcludedAssemblies.FindLazy(assemblyName) == null) { Assembly assembly = null; try { assembly = Assembly.ReflectionOnlyLoadFrom(assemblyName.EscapedCodeBase); } catch (FileLoadException) { } if (assembly != null) { CheckReferences(assembly); } } } }
private void CheckReferences(Assembly assembly) { var references = assembly.GetReferencedAssemblies() .Select(PrepareAssemblyName) .ToList(); foreach (AssemblyName name in references) { //Wenn die Referenz nirgendwo zu finden ist, dann ausgeben. if (Assemblies.Find(name) == null && ExcludedAssemblies.FindLazy(name) == null && !IsExcluded(name) && ReportedAssemblies.Find(name) == null) { ReportedAssemblies.Add(new MissingReference() { MissingAssembly = name, ReferencesBy = assembly.GetName() }); } } }