aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Prebuild/src/Core/Targets/VS2005Target.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Prebuild/src/Core/Targets/VS2005Target.cs')
-rw-r--r--Prebuild/src/Core/Targets/VS2005Target.cs30
1 files changed, 26 insertions, 4 deletions
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
364 return ret; 364 return ret;
365 } 365 }
366 366
367 private static bool ExtensionSpecified(string refName)
368 {
369 return refName.EndsWith(".dll") || refName.EndsWith(".exe");
370 }
371
372 private static string GetProjectExtension(ProjectNode project)
373 {
374 string extension = ".dll";
375 if (project.Type == ProjectType.Exe)
376 {
377 extension = ".exe";
378 }
379 return extension;
380 }
381
367 private void WriteProject(SolutionNode solution, ProjectNode project) 382 private void WriteProject(SolutionNode solution, ProjectNode project)
368 { 383 {
369 if (!tools.ContainsKey(project.Language)) 384 if (!tools.ContainsKey(project.Language))
@@ -474,14 +489,21 @@ namespace Prebuild.Core.Targets
474 ps.WriteLine("\" >"); 489 ps.WriteLine("\" >");
475 490
476 string path; 491 string path;
477 492
478 if (refr.Name.EndsWith(".dll", StringComparison.InvariantCultureIgnoreCase)) 493 if (String.IsNullOrEmpty(refr.Path))
479 { 494 {
480 path = Helper.NormalizePath(Path.Combine( refPath, refr.Name), '\\'); 495 if ( ExtensionSpecified( refr.Name ) )
496 {
497 path = Helper.NormalizePath(Path.Combine(refPath, refr.Name), '\\');
498 }
499 else
500 {
501 path = refr.Name + ".dll";
502 }
481 } 503 }
482 else 504 else
483 { 505 {
484 path = refr.Name + ".dll"; 506 path = refr.Path;
485 } 507 }
486 508
487 // TODO: Allow reference to *.exe files 509 // TODO: Allow reference to *.exe files