From 96a6da15f677d1364ab25ebaaae78329db25d7a3 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Fri, 23 Mar 2007 13:57:34 +0000 Subject: * Hopefully got vs2005 target to gen refs correctly --- Prebuild/src/Core/Targets/VS2005Target.cs | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'Prebuild/src') diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs index 3cfc8cd..341c12a 100644 --- a/Prebuild/src/Core/Targets/VS2005Target.cs +++ b/Prebuild/src/Core/Targets/VS2005Target.cs @@ -458,6 +458,8 @@ namespace Prebuild.Core.Targets // Assembly References ps.WriteLine(" "); + string refPath = ((ReferencePathNode) project.ReferencePaths[0]).Path; + foreach (ReferenceNode refr in project.References) { if (!solution.ProjectsTable.ContainsKey(refr.Name)) @@ -466,16 +468,21 @@ namespace Prebuild.Core.Targets ps.Write(" Include=\""); ps.Write(refr.Name); - if (!string.IsNullOrEmpty(refr.Version)) - { - ps.Write(", Version="); - ps.Write(refr.Version); - } - ps.WriteLine("\" >"); + string path; + + if( refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase )) + { + path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\'); + } + else + { + path = refr.Name + ".dll"; + } + // TODO: Allow reference to *.exe files - ps.WriteLine(" {0}", Helper.MakePathRelativeTo(project.FullPath, refr.Path + "\\" + refr.Name + ".dll")); + ps.WriteLine(" {0}", path ); ps.WriteLine(" {0}", refr.LocalCopy); ps.WriteLine(" "); } @@ -490,7 +497,10 @@ namespace Prebuild.Core.Targets { ProjectNode refProject = (ProjectNode)solution.ProjectsTable[refr.Name]; // TODO: Allow reference to visual basic projects - ps.WriteLine(" ", Helper.MakePathRelativeTo(project.FullPath, Helper.MakeFilePath(refProject.FullPath, refProject.Name, "csproj"))); + string path = + Helper.MakePathRelativeTo(project.FullPath, + Helper.MakeFilePath(refProject.FullPath, refProject.Name, "csproj")); + ps.WriteLine(" ", path ); // ps.WriteLine(" {0}", refProject.Name); // RealmForge.Utility -- cgit v1.1