public string GetAssembliesDir(IVsProject project = null)
        {
            if (project != null)
            {
                string assembliesDir = project.GetEvaluatedProperty(IceAssembliesDir);
                if (Directory.Exists(assembliesDir))
                {
                    return(assembliesDir);
                }
            }
            string iceHome = GetIceHome(project);

            if (Directory.Exists(Path.Combine(iceHome, "Assemblies")))
            {
                return(Path.Combine(iceHome, "Assemblies"));
            }
            else if (Directory.Exists(Path.Combine(iceHome, "csharp", "Assemblies")))
            {
                return(Path.Combine(iceHome, "csharp", "Assemblies"));
            }
            else if (Directory.Exists(Path.Combine(iceHome, "lib")))
            {
                return(Path.Combine(iceHome, "lib"));
            }

            return(string.Empty);
        }
        public string GetIceHome(IVsProject project = null)
        {
            string iceHome = string.Empty;

            if (project != null)
            {
                iceHome = project.GetEvaluatedProperty(IceHomeValue);
            }

            if (string.IsNullOrEmpty(iceHome))
            {
                object value = Registry.GetValue(IceBuilderKey, IceHomeValue, "");
                iceHome = value == null ? string.Empty : value.ToString();
            }

            return(iceHome);
        }
 public static string GetEvaluatedProperty(this IVsProject project, string name)
 {
     return(project.GetEvaluatedProperty(name, string.Empty));
 }