From 55d89b73edbfc12da6f6ec11c6f1aa429a7e7a40 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 17 Feb 2009 16:15:29 +0000 Subject: * fixed 'path' reference attribute for Nant and VS2008 targets. --- Prebuild/src/Core/Targets/VS2005Target.cs | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'Prebuild/src/Core/Targets/VS2005Target.cs') diff --git a/Prebuild/src/Core/Targets/VS2005Target.cs b/Prebuild/src/Core/Targets/VS2005Target.cs index 8e09711..5b7ad07 100644 --- a/Prebuild/src/Core/Targets/VS2005Target.cs +++ b/Prebuild/src/Core/Targets/VS2005Target.cs @@ -364,6 +364,21 @@ namespace Prebuild.Core.Targets return ret; } + private static bool ExtensionSpecified(string refName) + { + return refName.EndsWith(".dll") || refName.EndsWith(".exe"); + } + + private static string GetProjectExtension(ProjectNode project) + { + string extension = ".dll"; + if (project.Type == ProjectType.Exe) + { + extension = ".exe"; + } + return extension; + } + private void WriteProject(SolutionNode solution, ProjectNode project) { if (!tools.ContainsKey(project.Language)) @@ -474,14 +489,21 @@ namespace Prebuild.Core.Targets ps.WriteLine("\" >"); string path; - - if (refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase)) + + if (String.IsNullOrEmpty(refr.Path)) { - path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\'); + if ( ExtensionSpecified( refr.Name ) ) + { + path = Helper.NormalizePath(Path.Combine(refPath, refr.Name), '\\'); + } + else + { + path = refr.Name + ".dll"; + } } else { - path = refr.Name + ".dll"; + path = refr.Path; } // TODO: Allow reference to *.exe files -- cgit v1.1