From 2b4e63795372333be742069462bd08b5f4fbcb01 Mon Sep 17 00:00:00 2001 From: kdick Date: Tue, 17 Mar 2015 14:10:36 -0400 Subject: [PATCH] Support CoApp native nugets content folder & native framework --- .../MSBuild.NugetContentRestore.Tasks.csproj | 1 + .../NugetContentRestoreTask.cs | 8 +++++++- MSBuild.NugetContentRestore.nuspec | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/MSBuild.NugetContentRestore.Tasks/MSBuild.NugetContentRestore.Tasks.csproj b/MSBuild.NugetContentRestore.Tasks/MSBuild.NugetContentRestore.Tasks.csproj index 4cdb2a4..321740d 100755 --- a/MSBuild.NugetContentRestore.Tasks/MSBuild.NugetContentRestore.Tasks.csproj +++ b/MSBuild.NugetContentRestore.Tasks/MSBuild.NugetContentRestore.Tasks.csproj @@ -12,6 +12,7 @@ v4.0 512 + 2105ebfb true diff --git a/MSBuild.NugetContentRestore.Tasks/NugetContentRestoreTask.cs b/MSBuild.NugetContentRestore.Tasks/NugetContentRestoreTask.cs index 43ecf77..19b6661 100755 --- a/MSBuild.NugetContentRestore.Tasks/NugetContentRestoreTask.cs +++ b/MSBuild.NugetContentRestore.Tasks/NugetContentRestoreTask.cs @@ -18,7 +18,7 @@ public class NugetContentRestoreTask : Task #region Private Members - private readonly string[] _folders = new[] { "Scripts", "Images", "fonts", "content" }; + private readonly string[] _folders = new[] { "Scripts", "Images", "fonts", "content","native" }; private readonly string[] _ignoreFilePatterns = new[] { "*.transform", "*.install.xdt", "*.pp" }; private string _configFileFullPath; @@ -87,7 +87,13 @@ public override bool Execute() if (!sourceFolderInfo.Exists) continue; Log.LogMessage(MessageImportance.High, "NugetContentRestore :: {0} :: {1} :: Restoring content files", package.FolderName, folder); + if (folder.ToLower()=="native") + { + sourceFolderInfo.CopyTo(ProjectDir, true, filePatterns.ToArray()); + } + else { sourceFolderInfo.CopyTo(Path.Combine(ProjectDir, folder), true, filePatterns.ToArray()); + } } // Restore Package Content for additional folders (AdditionalFolder) diff --git a/MSBuild.NugetContentRestore.nuspec b/MSBuild.NugetContentRestore.nuspec index 2714464..a0a6f74 100755 --- a/MSBuild.NugetContentRestore.nuspec +++ b/MSBuild.NugetContentRestore.nuspec @@ -2,7 +2,7 @@ MSBuild.NugetContentRestore - 0.1.6 + 0.1.10 Francisco Lopez Francisco Lopez https://github.com/panchilo/MSBuild.NugetContentRestore @@ -21,9 +21,11 @@ nuget content restore msbuild task + + - + \ No newline at end of file