diff --git a/Prebuild/src/Core/Targets/VSGenericTarget.cs b/Prebuild/src/Core/Targets/VSGenericTarget.cs index 766c2f4000..bbea8603a8 100755 --- a/Prebuild/src/Core/Targets/VSGenericTarget.cs +++ b/Prebuild/src/Core/Targets/VSGenericTarget.cs @@ -299,10 +299,10 @@ namespace Prebuild.Core.Targets // Output the ItemGroup for project.References WriteProjectReferences(solution, project, ps); - // ps.WriteLine(" "); - ps.WriteLine(" "); + //ps.WriteLine(" "); + ps.WriteLine(" "); - // ps.WriteLine(" "); + //ps.WriteLine(" "); List list = new List(); foreach (string path in project.Files) @@ -314,7 +314,6 @@ namespace Prebuild.Core.Targets if (!list.Contains(codebehind)) list.Add(codebehind); } - } #region Files @@ -325,11 +324,11 @@ namespace Prebuild.Core.Targets // for each destination if (project.Files.GetBuildAction(filePath) == BuildAction.Copy) continue; - // if (file == "Properties\\Bind.Designer.cs") - // { - // Console.WriteLine("Wait a minute!"); - // Console.WriteLine(project.Files.GetSubType(file).ToString()); - // } + //if (file == "Properties\\Bind.Designer.cs") + //{ + // Console.WriteLine("Wait a minute!"); + // Console.WriteLine(project.Files.GetSubType(file).ToString()); + //} SubType subType = project.Files.GetSubType(filePath); // Visual Studio chokes on file names if forward slash is used as a path separator @@ -340,16 +339,16 @@ namespace Prebuild.Core.Targets if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer && subType != SubType.CodeBehind) { - ps.WriteLine(" ", file.Substring(0, file.LastIndexOf('.')) + ".resx"); - ps.WriteLine(" {0}", Path.GetFileName(file)); - ps.WriteLine(" Designer"); - ps.WriteLine(" "); + ps.WriteLine(" ", file.Substring(0, file.LastIndexOf('.')) + ".resx"); + ps.WriteLine(" {0}", Path.GetFileName(file)); + ps.WriteLine(" Designer"); + ps.WriteLine(" "); // } if (subType == SubType.Designer) { - ps.WriteLine(" ", file); + ps.WriteLine(" ", file); string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"; string dependent_name = filePath.Substring(0, file.LastIndexOf('.')) + ".cs"; @@ -357,57 +356,57 @@ namespace Prebuild.Core.Targets // Check for a parent .cs file with the same name as this designer file if (File.Exists(Helper.NormalizePath(dependent_name))) { - ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); + ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); } else { - ps.WriteLine(" ResXFileCodeGenerator"); - ps.WriteLine(" {0}", Path.GetFileName(autogen_name)); - ps.WriteLine(" " + subType + ""); + ps.WriteLine(" ResXFileCodeGenerator"); + ps.WriteLine(" {0}", Path.GetFileName(autogen_name)); + ps.WriteLine(" " + subType + ""); } - ps.WriteLine(" "); + ps.WriteLine(" "); if (File.Exists(Helper.NormalizePath(autogen_name))) { - ps.WriteLine(" ", autogen_name); - //ps.WriteLine(" True"); + ps.WriteLine(" ", autogen_name); + //ps.WriteLine(" True"); // If a parent .cs file exists, link this autogen file to it. Otherwise link // to the designer file if (File.Exists(dependent_name)) { - ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); + ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); } else { - ps.WriteLine(" True"); - ps.WriteLine(" {0}", Path.GetFileName(filePath)); + ps.WriteLine(" True"); + ps.WriteLine(" {0}", Path.GetFileName(filePath)); } - ps.WriteLine(" "); + ps.WriteLine(" "); } list.Add(autogen_name); } if (subType == SubType.Settings) { - ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); - ps.WriteLine("Include=\"{0}\">", file); + ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); + ps.WriteLine(" Include=\"{0}\">", file); string fileName = Path.GetFileName(filePath); if (project.Files.GetBuildAction(filePath) == BuildAction.None) { - ps.WriteLine(" SettingsSingleFileGenerator"); - ps.WriteLine(" {0}", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); + ps.WriteLine(" SettingsSingleFileGenerator"); + ps.WriteLine(" {0}", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); } else { - ps.WriteLine(" Code"); - ps.WriteLine(" True"); - ps.WriteLine(" True"); + ps.WriteLine(" Code"); + ps.WriteLine(" True"); + ps.WriteLine(" True"); string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); - ps.WriteLine(" {0}", Path.GetFileName(fileNameShorter + ".settings")); + ps.WriteLine(" {0}", Path.GetFileName(fileNameShorter + ".settings")); } - ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); + ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); } else if (subType != SubType.Designer) { @@ -416,14 +415,13 @@ namespace Prebuild.Core.Targets if (!list.Contains(filePath)) { - ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); + ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); int startPos = 0; if (project.Files.GetPreservePath(filePath)) { while ((@"./\").IndexOf(file.Substring(startPos, 1)) != -1) startPos++; - } else { @@ -432,7 +430,7 @@ namespace Prebuild.Core.Targets // be sure to write out the path with backslashes so VS recognizes // the file properly. - ps.WriteLine("Include=\"{0}\">", file); + ps.WriteLine(" Include=\"{0}\">", file); int last_period_index = file.LastIndexOf('.'); string short_file_name = (last_period_index >= 0) @@ -454,41 +452,41 @@ namespace Prebuild.Core.Targets // or usercontrol that don't have an associated resx file. // 2. Connect settings files to associated designer files. if (File.Exists(file_name + extension)) - ps.WriteLine(" {0}", Path.GetFileName(file_name + extension)); + ps.WriteLine(" {0}", Path.GetFileName(file_name + extension)); else if (File.Exists(file_name + ".resx")) - ps.WriteLine(" {0}", Path.GetFileName(file_name + ".resx")); + ps.WriteLine(" {0}", Path.GetFileName(file_name + ".resx")); else if (File.Exists(file_name + ".settings")) { - ps.WriteLine(" {0}", Path.GetFileName(file_name + ".settings")); - ps.WriteLine(" True"); - ps.WriteLine(" True"); + ps.WriteLine(" {0}", Path.GetFileName(file_name + ".settings")); + ps.WriteLine(" True"); + ps.WriteLine(" True"); } } else if (subType == SubType.CodeBehind) { - ps.WriteLine(" {0}", Path.GetFileName(short_file_name)); + ps.WriteLine(" {0}", Path.GetFileName(short_file_name)); } if (project.Files.GetIsLink(filePath)) { string alias = project.Files.GetLinkPath(filePath); alias += file.Substring(startPos); alias = Helper.NormalizePath(alias); - ps.WriteLine(" {0}", alias); + ps.WriteLine(" {0}", alias); } else if (project.Files.GetBuildAction(filePath) != BuildAction.None) { if (project.Files.GetBuildAction(filePath) != BuildAction.EmbeddedResource) { - ps.WriteLine(" {0}", subType); + ps.WriteLine(" {0}", subType); } } if (project.Files.GetCopyToOutput(filePath) != CopyToOutput.Never) { - ps.WriteLine(" {0}", project.Files.GetCopyToOutput(filePath)); + ps.WriteLine(" {0}", project.Files.GetCopyToOutput(filePath)); } - ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); + ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); } } } @@ -529,13 +527,13 @@ namespace Prebuild.Core.Targets ps.WriteLine(" "); } - ps.WriteLine(" "); - ps.WriteLine(" "); - ps.WriteLine(" "); - ps.WriteLine(" "); - ps.WriteLine(" "); - ps.WriteLine(" "); - ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" "); ps.WriteLine(""); } #endregion @@ -599,15 +597,15 @@ namespace Prebuild.Core.Targets // Assembly References if (otherReferences.Count > 0) { - ps.WriteLine(" "); + ps.WriteLine(" "); foreach (ReferenceNode refr in otherReferences) { - ps.Write(" "); - ps.Write(" "); + ps.Write(" "); ps.Write(refr.Name); ps.WriteLine(""); @@ -618,32 +616,32 @@ namespace Prebuild.Core.Targets if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) { // Assembly is an executable (exe) - ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "exe")); + ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "exe")); } else if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) { // Assembly is an library (dll) - ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); + ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); } else { string referencePath = Helper.MakeFilePath(refr.Path, refr.Name, "dll"); kernel.Log.Write(LogType.Warning, "Reference \"{0}\": The specified file doesn't exist.", referencePath); - ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); + ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); } } - ps.WriteLine(" {0}", refr.LocalCopy); - ps.WriteLine(" "); + ps.WriteLine(" {0}", refr.LocalCopy); + ps.WriteLine(" "); } - ps.WriteLine(" "); + ps.WriteLine(" "); ps.WriteLine(); } //Project References if (projectReferences.Count > 0) { - ps.WriteLine(" "); + ps.WriteLine(" "); foreach (KeyValuePair pair in projectReferences) { ToolInfo tool = tools[pair.Value.Language]; @@ -653,19 +651,19 @@ namespace Prebuild.Core.Targets string path = Helper.MakePathRelativeTo(project.FullPath, Helper.MakeFilePath(pair.Value.FullPath, pair.Value.Name, tool.FileExtension)); - ps.WriteLine(" ", path); + ps.WriteLine(" ", path); // TODO: Allow reference to visual basic projects - ps.WriteLine(" {0}", pair.Value.Name); - ps.WriteLine(" {0}", pair.Value.Guid.ToString("B").ToUpper()); - ps.WriteLine(" {0}", tool.Guid.ToUpper()); + ps.WriteLine(" {0}", pair.Value.Name); + ps.WriteLine(" {0}", pair.Value.Guid.ToString("B").ToUpper()); + ps.WriteLine(" {0}", tool.Guid.ToUpper()); //This is the Copy Local flag in VS - ps.WriteLine(" {0}", pair.Key.LocalCopy); + ps.WriteLine(" {0}", pair.Key.LocalCopy); - ps.WriteLine(" "); + ps.WriteLine(" "); } - ps.WriteLine(" "); + ps.WriteLine(" "); ps.WriteLine(); } } @@ -673,7 +671,7 @@ namespace Prebuild.Core.Targets private void WriteProjectDotNet(SolutionNode solution, ProjectNode project, StreamWriter ps) { #region Project File - bool listFiles = false; + bool listFiles = project.Files.Count > 0; string prebuild = string.Empty; string postbuild = string.Empty; using (ps) @@ -694,6 +692,8 @@ namespace Prebuild.Core.Targets //ps.WriteLine(" false"); ps.WriteLine(" false"); ps.WriteLine(" false"); + if (listFiles) + ps.WriteLine(" false"); ps.WriteLine(" "); ps.WriteLine(); @@ -712,45 +712,43 @@ namespace Prebuild.Core.Targets } else { - ps.Write(" ", conf.Name, conf.Platform); - ps.WriteLine(" {0}", conf.Options["AllowUnsafe"]); - ps.WriteLine(" {0}", conf.Options["BaseAddress"]); + ps.WriteLine(" {0}", conf.Options["AllowUnsafe"]); + ps.WriteLine(" {0}", conf.Options["BaseAddress"]); if ((bool)conf.Options["CheckUnderflowOverflow"]) - ps.WriteLine(" True"); - ps.WriteLine(" "); - ps.WriteLine(" "); - ps.WriteLine(" {0}", + ps.WriteLine(" True"); + ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" {0}", conf.Options["CompilerDefines"].ToString() == "" ? this.kernel.ForcedConditionals : conf.Options["CompilerDefines"] + ";" + kernel.ForcedConditionals); - ps.WriteLine(" {0}", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString())); - ps.WriteLine(" {0}", conf.Options["DebugInformation"]); - ps.WriteLine(" {0}", conf.Options["FileAlignment"]); - ps.WriteLine(" {0}", conf.Options["OptimizeCode"]); - ps.WriteLine(" false"); + ps.WriteLine(" {0}", Helper.NormalizePath(conf.Options["XmlDocFile"].ToString())); + ps.WriteLine(" {0}", conf.Options["DebugInformation"]); + ps.WriteLine(" {0}", conf.Options["FileAlignment"]); + ps.WriteLine(" {0}", conf.Options["OptimizeCode"]); + ps.WriteLine(" false"); - ps.WriteLine(" {0}", conf.Options["UseCommonOutputDirectory"].ToString()); - ps.WriteLine(" {0}", conf.Options["AppendTargetFrameworkToOutputPath"].ToString()); - ps.WriteLine(" {0}", conf.Options["AppendRuntimeIdentifierToOutputPath"].ToString()); - if ((bool)conf.Options["EnableDefaultItems"] == false) - { - listFiles = true; - ps.WriteLine(" false"); - } + ps.WriteLine(" {0}", conf.Options["UseCommonOutputDirectory"].ToString()); + ps.WriteLine(" {0}", conf.Options["AppendTargetFrameworkToOutputPath"].ToString()); + ps.WriteLine(" {0}", conf.Options["AppendRuntimeIdentifierToOutputPath"].ToString()); + + if (!listFiles && (bool)conf.Options["EnableDefaultItems"] == false) + ps.WriteLine(" false"); if (project.Type != ProjectType.Web) - ps.WriteLine(" {0}", + ps.WriteLine(" {0}", Helper.EndPath(Helper.NormalizePath(conf.Options["OutputPath"].ToString()))); else - ps.WriteLine(" {0}", + ps.WriteLine(" {0}", Helper.EndPath(Helper.NormalizePath("bin\\"))); - ps.WriteLine(" {0}", conf.Options["RegisterComInterop"]); - ps.WriteLine(" {0}", conf.Options["RemoveIntegerChecks"]); - ps.WriteLine(" {0}", conf.Options["WarningsAsErrors"]); - ps.WriteLine(" {0}", conf.Options["WarningLevel"]); - ps.WriteLine(" {0}", conf.Options["NoStdLib"]); - ps.WriteLine(" {0}", conf.Options["SuppressWarnings"]); - ps.WriteLine(" {0}", conf.Platform); + ps.WriteLine(" {0}", conf.Options["RegisterComInterop"]); + ps.WriteLine(" {0}", conf.Options["RemoveIntegerChecks"]); + ps.WriteLine(" {0}", conf.Options["WarningsAsErrors"]); + ps.WriteLine(" {0}", conf.Options["WarningLevel"]); + ps.WriteLine(" {0}", conf.Options["NoStdLib"]); + ps.WriteLine(" {0}", conf.Options["SuppressWarnings"]); + ps.WriteLine(" {0}", conf.Platform); if (conf.Options["PreBuildEvent"] != null && conf.Options["PreBuildEvent"].ToString().Length != 0) { @@ -761,7 +759,7 @@ namespace Prebuild.Core.Targets postbuild = conf.Options["PostBuildEvent"].ToString(); } - ps.WriteLine(" "); + ps.WriteLine(" "); } } @@ -789,10 +787,10 @@ namespace Prebuild.Core.Targets // Output the ItemGroup for project.References WriteProjectReferencesDotNet(solution, project, ps); - if (listFiles) + if (project.Files.Count > 0 ) { List list = new List(); - ps.WriteLine(" "); + ps.WriteLine(" "); foreach (string filePath in project.Files) { // Add the filePath with the destination as the key @@ -800,11 +798,11 @@ namespace Prebuild.Core.Targets // for each destination if (project.Files.GetBuildAction(filePath) == BuildAction.Copy) continue; - // if (file == "Properties\\Bind.Designer.cs") - // { - // Console.WriteLine("Wait a minute!"); - // Console.WriteLine(project.Files.GetSubType(file).ToString()); - // } + //if (file == "Properties\\Bind.Designer.cs") + //{ + // Console.WriteLine("Wait a minute!"); + // Console.WriteLine(project.Files.GetSubType(file).ToString()); + //} SubType subType = project.Files.GetSubType(filePath); // Visual Studio chokes on file names if forward slash is used as a path separator @@ -815,16 +813,16 @@ namespace Prebuild.Core.Targets if (subType != SubType.Code && subType != SubType.Settings && subType != SubType.Designer && subType != SubType.CodeBehind) { - ps.WriteLine(" ", file.Substring(0, file.LastIndexOf('.')) + ".resx"); - ps.WriteLine(" {0}", Path.GetFileName(file)); - ps.WriteLine(" Designer"); - ps.WriteLine(" "); + ps.WriteLine(" ", file.Substring(0, file.LastIndexOf('.')) + ".resx"); + ps.WriteLine(" {0}", Path.GetFileName(file)); + ps.WriteLine(" Designer"); + ps.WriteLine(" "); // } if (subType == SubType.Designer) { - ps.WriteLine(" ", file); + ps.WriteLine(" ", file); string autogen_name = file.Substring(0, file.LastIndexOf('.')) + ".Designer.cs"; string dependent_name = filePath.Substring(0, file.LastIndexOf('.')) + ".cs"; @@ -832,57 +830,57 @@ namespace Prebuild.Core.Targets // Check for a parent .cs file with the same name as this designer file if (File.Exists(Helper.NormalizePath(dependent_name))) { - ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); + ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); } else { - ps.WriteLine(" ResXFileCodeGenerator"); - ps.WriteLine(" {0}", Path.GetFileName(autogen_name)); - ps.WriteLine(" " + subType + ""); + ps.WriteLine(" ResXFileCodeGenerator"); + ps.WriteLine(" {0}", Path.GetFileName(autogen_name)); + ps.WriteLine(" " + subType + ""); } - ps.WriteLine(" "); + ps.WriteLine(" "); if (File.Exists(Helper.NormalizePath(autogen_name))) { - ps.WriteLine(" ", autogen_name); + ps.WriteLine(" ", autogen_name); //ps.WriteLine(" True"); // If a parent .cs file exists, link this autogen file to it. Otherwise link // to the designer file if (File.Exists(dependent_name)) { - ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); + ps.WriteLine(" {0}", Path.GetFileName(dependent_name)); } else { - ps.WriteLine(" True"); - ps.WriteLine(" {0}", Path.GetFileName(filePath)); + ps.WriteLine(" True"); + ps.WriteLine(" {0}", Path.GetFileName(filePath)); } - ps.WriteLine(" "); + ps.WriteLine(" "); } list.Add(autogen_name); } if (subType == SubType.Settings) { - ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); + ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); ps.WriteLine("Include=\"{0}\">", file); string fileName = Path.GetFileName(filePath); if (project.Files.GetBuildAction(filePath) == BuildAction.None) { - ps.WriteLine(" SettingsSingleFileGenerator"); - ps.WriteLine(" {0}", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); + ps.WriteLine(" SettingsSingleFileGenerator"); + ps.WriteLine(" {0}", fileName.Substring(0, fileName.LastIndexOf('.')) + ".Designer.cs"); } else { - ps.WriteLine(" Code"); - ps.WriteLine(" True"); - ps.WriteLine(" True"); + ps.WriteLine(" Code"); + ps.WriteLine(" True"); + ps.WriteLine(" True"); string fileNameShort = fileName.Substring(0, fileName.LastIndexOf('.')); string fileNameShorter = fileNameShort.Substring(0, fileNameShort.LastIndexOf('.')); - ps.WriteLine(" {0}", Path.GetFileName(fileNameShorter + ".settings")); + ps.WriteLine(" {0}", Path.GetFileName(fileNameShorter + ".settings")); } - ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); + ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); } else if (subType != SubType.Designer) { @@ -891,7 +889,7 @@ namespace Prebuild.Core.Targets if (!list.Contains(filePath)) { - ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); + ps.Write(" <{0} ", project.Files.GetBuildAction(filePath)); int startPos = 0; if (project.Files.GetPreservePath(filePath)) @@ -929,41 +927,41 @@ namespace Prebuild.Core.Targets // or usercontrol that don't have an associated resx file. // 2. Connect settings files to associated designer files. if (File.Exists(file_name + extension)) - ps.WriteLine(" {0}", Path.GetFileName(file_name + extension)); + ps.WriteLine(" {0}", Path.GetFileName(file_name + extension)); else if (File.Exists(file_name + ".resx")) - ps.WriteLine(" {0}", Path.GetFileName(file_name + ".resx")); + ps.WriteLine(" {0}", Path.GetFileName(file_name + ".resx")); else if (File.Exists(file_name + ".settings")) { - ps.WriteLine(" {0}", Path.GetFileName(file_name + ".settings")); - ps.WriteLine(" True"); - ps.WriteLine(" True"); + ps.WriteLine(" {0}", Path.GetFileName(file_name + ".settings")); + ps.WriteLine(" True"); + ps.WriteLine(" True"); } } else if (subType == SubType.CodeBehind) { - ps.WriteLine(" {0}", Path.GetFileName(short_file_name)); + ps.WriteLine(" {0}", Path.GetFileName(short_file_name)); } if (project.Files.GetIsLink(filePath)) { string alias = project.Files.GetLinkPath(filePath); alias += file.Substring(startPos); alias = Helper.NormalizePath(alias); - ps.WriteLine(" {0}", alias); + ps.WriteLine(" {0}", alias); } else if (project.Files.GetBuildAction(filePath) != BuildAction.None) { if (project.Files.GetBuildAction(filePath) != BuildAction.EmbeddedResource) { - ps.WriteLine(" {0}", subType); + ps.WriteLine(" {0}", subType); } } if (project.Files.GetCopyToOutput(filePath) != CopyToOutput.Never) { - ps.WriteLine(" {0}", project.Files.GetCopyToOutput(filePath)); + ps.WriteLine(" {0}", project.Files.GetCopyToOutput(filePath)); } - ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); + ps.WriteLine(" ", project.Files.GetBuildAction(filePath)); } } } @@ -973,19 +971,18 @@ namespace Prebuild.Core.Targets if (!string.IsNullOrEmpty(prebuild)) { ps.WriteLine(" "); - ps.WriteLine(" ", prebuild); - ps.WriteLine(" "); + ps.WriteLine(" ", prebuild); + ps.WriteLine(" "); } if (!string.IsNullOrEmpty(postbuild)) { - ps.WriteLine(" "); - ps.WriteLine(" ", postbuild); - ps.WriteLine(" "); + ps.WriteLine(" "); + ps.WriteLine(" ", postbuild); + ps.WriteLine(" "); } ps.WriteLine(""); #endregion - } } @@ -1006,16 +1003,16 @@ namespace Prebuild.Core.Targets // Assembly References if (otherReferences.Count > 0) { - ps.WriteLine(" "); + ps.WriteLine(" "); foreach (ReferenceNode refr in otherReferences) { - ps.Write(" "); - ps.Write(" "); + ps.Write(" "); ps.Write(refr.Name); ps.WriteLine(""); @@ -1026,18 +1023,18 @@ namespace Prebuild.Core.Targets if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) { // Assembly is an executable (exe) - ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "exe")); + ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "exe")); } else if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) { // Assembly is an library (dll) - ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); + ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); } else { string referencePath = Helper.MakeFilePath(refr.Path, refr.Name, "dll"); kernel.Log.Write(LogType.Warning, "Reference \"{0}\": The specified file doesn't exist.", referencePath); - ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); + ps.WriteLine(" {0}", Helper.MakeFilePath(refr.Path, refr.Name, "dll")); } } else @@ -1048,12 +1045,12 @@ namespace Prebuild.Core.Targets if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "exe"))) { // Assembly is an executable (exe) - ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "exe")); + ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "exe")); } else if (File.Exists(Helper.MakeFilePath(absolutePath, refr.Name, "dll"))) { // Assembly is an library (dll) - ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "dll")); + ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "dll")); } else { @@ -1062,17 +1059,17 @@ namespace Prebuild.Core.Targets // ps.WriteLine(" {0}", Helper.MakeFilePath(absolutePath, refr.Name, "dll")); } } - ps.WriteLine(" {0}", refr.LocalCopy); - ps.WriteLine(" "); + ps.WriteLine(" {0}", refr.LocalCopy); + ps.WriteLine(" "); } - ps.WriteLine(" "); + ps.WriteLine(" "); ps.WriteLine(); } //Project References if (projectReferences.Count > 0) { - ps.WriteLine(" "); + ps.WriteLine(" "); foreach (KeyValuePair pair in projectReferences) { ToolInfo tool = tools[pair.Value.Language]; @@ -1082,9 +1079,9 @@ namespace Prebuild.Core.Targets string path = Helper.MakePathRelativeTo(project.FullPath, Helper.MakeFilePath(pair.Value.FullPath, pair.Value.Name, tool.FileExtension)); - ps.WriteLine(" ", path); + ps.WriteLine(" ", path); } - ps.WriteLine(" "); + ps.WriteLine(" "); ps.WriteLine(); } } diff --git a/Prebuild/src/Core/Targets/XcodeTarget.cs b/Prebuild/src/Core/Targets/XcodeTarget.cs index 5393cec05f..da1e8ac497 100644 --- a/Prebuild/src/Core/Targets/XcodeTarget.cs +++ b/Prebuild/src/Core/Targets/XcodeTarget.cs @@ -342,14 +342,14 @@ namespace Prebuild.Core.Targets ss.WriteLine(" "); ss.WriteLine(" "); ss.WriteLine(" "); - // foreach(ReferenceNode refr in project.References) - // { - // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/'); - // if (path != "") - // { - // ss.WriteLine(" ", path); - // } - // } + //foreach(ReferenceNode refr in project.References) + //{ + // string path = Helper.NormalizePath(Helper.MakePathRelativeTo(project.FullPath, BuildReferencePath(solution, refr)), '/'); + // if (path != "") + // { + // ss.WriteLine(" ", path); + // } + //} ss.WriteLine(" "); ss.WriteLine(" "); ss.WriteLine(" ");