Пример #1
0
        private void PlugIn1_SolutionOpened()
        {
            SolutionElement activeSolution = CodeRush.Source.ActiveSolution;

            if (activeSolution == null)
            {
                return;
            }

            List <string> unresolvedAssemblies = new List <string>();

            foreach (ProjectElement project in activeSolution.ProjectElements)
            {
                foreach (AssemblyReference reference in project.AssemblyReferences)
                {
                    if (reference.Name.StartsWith("DevExpress"))
                    {
                        if (!File.Exists(reference.FilePath))
                        {
                            unresolvedAssemblies.Add(reference.Name);
                        }
                    }
                }
            }

            if (unresolvedAssemblies.Count > 0)
            {
                UnresolvedReferences form = new UnresolvedReferences(unresolvedAssemblies);
                form.ShowDialog(CodeRush.IDE);
            }
        }
Пример #2
0
    private void PlugIn1_SolutionOpened()
    {
      SolutionElement activeSolution = CodeRush.Source.ActiveSolution;
      if (activeSolution == null)
      	return;

      List<string> unresolvedAssemblies = new List<string>();
      foreach (ProjectElement project in activeSolution.ProjectElements)
      {
        foreach (AssemblyReference reference in project.AssemblyReferences)
        {
          if (reference.Name.StartsWith("DevExpress"))
            if (!File.Exists(reference.FilePath))
              unresolvedAssemblies.Add(reference.Name);
        }
      }

      if (unresolvedAssemblies.Count > 0)
      {
        UnresolvedReferences form = new UnresolvedReferences(unresolvedAssemblies);
        form.ShowDialog(CodeRush.IDE);
      }
    }