Ejemplo n.º 1
0
        public override string ToString()
        {
            var result = new StringBuilder("[" + GetType().FullName + "]\n");

            result.AppendLine("ProjectFile: " + ProjectFile);
            result.AppendLine("ProjectRoot: " + ProjectRoot);
            result.AppendLine("ParseResult: " + ParseResult);
            result.AppendLine("TargetFrameworkVersion: " + TargetFrameworkVersion);
            result.AppendLine("Platform: " + Platform);
            result.AppendLine("PlatformTarget: " + PlatformTarget);
            result.AppendLine("OutputPathProjectFile: " + OutputPath);
            result.AppendLine("AssemblyName: " + AssemblyName);
            result.AppendLine("Valid: " + GetValidationMessage());
            result.AppendLine("CompileItems: " + CompileItems.Count);

            result.AppendLine("ProjectReferences: ");
            if (ProjectReferences != null)
            {
                foreach (var item in ProjectReferences.OrderBy(x => x))
                {
                    result.AppendLine("    " + item);
                }
            }

            if (DllReferences != null)
            {
                result.AppendLine("DllReferences: ");
                foreach (var item in DllReferences.OrderBy(x => x.Assembly))
                {
                    if (item.Assembly.ToUpper().StartsWith("FILMTRACK"))
                    {
                        result.AppendLine("*   " + item);
                    }
                    else
                    {
                        //result.AppendLine("    " + item);
                        result.Append(Indent.IndentString(item.ToString(), 4));
                    }
                }
            }

            //result.AppendLine("CompileItems: ");
            //foreach (var item in CompileItems)
            //{
            //    result.AppendLine("    " + item);
            //}

            //result.AppendLine("Items: ");
            //result.AppendLine(Items);
            //result.AppendLine("");

            return(result.ToString());
        }
Ejemplo n.º 2
0
        private string GetValidationMessage()
        {
            var result = "";

            if (DllReferences != null && DllReferences.Where(x => x.Assembly.StartsWith("Filmtrack")).Any())
            {
                result = "DllReferences contain Filmtrack references.";
            }

            foreach (var item in DllReferences)
            {
                if (item.HintPath.StartsWith("."))
                {
                    // Try and find the dll referred to
                    var projectFileFolder = new FileInfo(ProjectFile).Directory;

                    var absoluteAssembly2 = new FileInfo(Path.Combine(projectFileFolder.FullName, item.HintPath));
                }
            }

            return(result);
        }