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