Ejemplo n.º 1
3
 public static void Run()
 {
     Projects allProjects = new Projects();
     Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.UnloadAllProjects();
     SolutionFile solution = new SolutionFile();
     solution.BuildSolution(true);
 }
Ejemplo n.º 2
3
        static void Main(string[] args)
        {
            DirectoryInfo dir = new DirectoryInfo(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile));
            DelMe("*.cs", dir);
            Console.WriteLine("done writing to .cs files");

            Projects allProjects = new Projects();

            /*below Unload is needed because instantating Micrsooft's Project object forces a reference to be kept in the global project collection.
            Huge waste of memory (rarely will all projects on computer be used) but forces lookup time = O(total number of projects on comp).
            More time and memory efficient to instantiate project objects iff they are going to be built*/
            Microsoft.Build.Evaluation.ProjectCollection.GlobalProjectCollection.UnloadAllProjects();

            SolutionFile solution = new SolutionFile();
            solution.BuildSolution(true); // bool is runInParallel?
            //solution.BuildSolution(false); // bool is runInParallel?

            Console.ReadLine();
        }