|
29 | 29 | let name = file.Element("name") |
30 | 30 | let sourceFileName = file.Element("sourceFileName") |
31 | 31 | let fullFilePath = sourceFileName?.Value ?? Path.Combine(path?.Value ?? string.Empty, name.Value) |
32 | | - select new TaskItem(fullFilePath) |
| 32 | + select new TaskItem(fullFilePath, new Dictionary<string, object> { { "RecursiveDir", Path.GetDirectoryName(fullFilePath) }, }) |
33 | 33 | ).ToArray(); |
34 | 34 | ]]> |
35 | 35 | </Code> |
|
46 | 46 | <Output TaskParameter="Value" PropertyName="Version" /> |
47 | 47 | </XmlRead> |
48 | 48 | <ExtensionPackager Manifest="$(DNNFileName).dnn" WorkingFolder="$(MSBuildProjectDirectory)\"> |
49 | | - <Output TaskParameter="PackageFiles" PropertyName="PackageFiles"> |
| 49 | + <Output TaskParameter="PackageFiles" ItemName="PackageFiles"> |
50 | 50 | </Output> |
51 | 51 | </ExtensionPackager> |
52 | 52 |
|
|
58 | 58 | <LicenseFiles Include="license.txt"/> |
59 | 59 | </ItemGroup> |
60 | 60 | <Copy SourceFiles="@(LicenseFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" /> |
| 61 | + |
61 | 62 | <ItemGroup> |
62 | 63 | <ReleaseNotesFiles Include="releaseNotes.txt"/> |
63 | 64 | </ItemGroup> |
64 | 65 | <Copy SourceFiles="@(ReleaseNotesFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package" /> |
65 | | - <CreateItem Include="$(PackageFiles)"> |
66 | | - <Output TaskParameter="Include" ItemName="OutputContent" /> |
67 | | - </CreateItem> |
68 | | - <Copy SourceFiles="$(OutputContent)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(OutputContent.RecursiveDir)" /> |
| 66 | + |
| 67 | + <Copy SourceFiles="@(PackageFiles)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(PackageFiles.RecursiveDir)" /> |
| 68 | + |
69 | 69 | <CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*"> |
70 | 70 | <Output TaskParameter="Include" ItemName="ZipOutputContent" /> |
71 | 71 | </CreateItem> |
72 | 72 | <Zip Files="@(ZipOutputContent)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Install.$(Extension)" /> |
73 | 73 | <Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" DestinationFolder="$(InstallPath)" /> |
| 74 | + |
74 | 75 | <Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" /> |
75 | 76 | <RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" ContinueOnError="WarnAndContinue" /> |
76 | 77 | </Target> |
|
0 commit comments