Exemple #1
0
    static bool IsCommonLibrary(MsbuildGenerator.VsCsproj proj)
    {
        var library = proj.library;

        //if (library.Contains ("-basic"))
        //	return true;
        //if (library.Contains ("-build"))
        //	return true;
        //if (library.StartsWith ("corlib"))
        //	return true;
        if (library.StartsWith("System-"))
        {
            return(true);
        }
        if (library.StartsWith("System.Xml"))
        {
            return(true);
        }
        if (library.StartsWith("System.Secu"))
        {
            return(true);
        }
        if (library.StartsWith("System.Configuration"))
        {
            return(true);
        }
        if (library.StartsWith("System.Core"))
        {
            return(true);
        }
        //if (library.StartsWith ("Mono."))
        //	return true;

        return(false);
    }
Exemple #2
0
 public void Add(MsbuildGenerator.VsCsproj vsproj)
 {
     try {
         libraries.Add(vsproj);
     } catch (Exception ex) {
         Console.WriteLine(ex);
     }
 }
Exemple #3
0
    static void RecursiveAddProj(SlnGenerator solution, MsbuildGenerator.VsCsproj vsCsproj, int recursiveDepth = 1)
    {
        const int max_recursive = 16;

        if (recursiveDepth > max_recursive)
        {
            throw new Exception(string.Format("Reached {0} levels of project dependency", max_recursive));
        }
        foreach (var projRef in vsCsproj.projReferences)
        {
            if (!solution.ContainsProjectIdentifier(projRef.library))
            {
                solution.Add(projRef);
                RecursiveAddProj(solution, projRef, recursiveDepth + 1);
            }
        }
    }