From 537492ccf528a0bef7325571f8f9d6e746ff44f5 Mon Sep 17 00:00:00 2001 From: Wei Wang Date: Fri, 12 Sep 2014 10:20:21 -0700 Subject: [PATCH] Support "kpm pack" packing project root when '--wwwroot' is "." --- src/Microsoft.Framework.PackageManager/Packing/PackProject.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Microsoft.Framework.PackageManager/Packing/PackProject.cs b/src/Microsoft.Framework.PackageManager/Packing/PackProject.cs index 1e5e9f54d..d2c2c963f 100644 --- a/src/Microsoft.Framework.PackageManager/Packing/PackProject.cs +++ b/src/Microsoft.Framework.PackageManager/Packing/PackProject.cs @@ -273,7 +273,9 @@ private void CopyContentFiles(PackRoot root, Runtime.Project project) Console.WriteLine("Copying contents of project dependency {0} to {1}", _libraryDescription.Identity.Name, WwwRootOut); - var wwwRootPath = Path.Combine(project.ProjectDirectory, WwwRoot); + // If the value of '--wwwroot' is ".", we need to pack the project root dir + // Use Path.GetFullPath() to get rid of the trailing "." + var wwwRootPath = Path.GetFullPath(Path.Combine(project.ProjectDirectory, WwwRoot)); var wwwRootOutPath = Path.Combine(root.OutputPath, WwwRootOut); Console.WriteLine(" Source {0}", wwwRootPath);