diff options
| author | Bob Arnson <bob@firegiant.com> | 2025-04-24 21:32:49 -0400 |
|---|---|---|
| committer | Bob Arnson <github@bobs.org> | 2025-06-18 16:15:49 -0400 |
| commit | 50fe3d149a101b2569647689673fa01d67ff5267 (patch) | |
| tree | 418fc10800ee23318d3ce7820aee1465b49c1db0 /src/tools/WixToolset.HeatTasks/RefreshTask.cs | |
| parent | 390ee54c29d050ba393ff431115308bdb2aaf4ca (diff) | |
| download | wix-50fe3d149a101b2569647689673fa01d67ff5267.tar.gz wix-50fe3d149a101b2569647689673fa01d67ff5267.tar.bz2 wix-50fe3d149a101b2569647689673fa01d67ff5267.zip | |
Remove deprecated Heat.
Fixes https://github.com/wixtoolset/issues/issues/9039
Diffstat (limited to 'src/tools/WixToolset.HeatTasks/RefreshTask.cs')
| -rw-r--r-- | src/tools/WixToolset.HeatTasks/RefreshTask.cs | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/src/tools/WixToolset.HeatTasks/RefreshTask.cs b/src/tools/WixToolset.HeatTasks/RefreshTask.cs deleted file mode 100644 index 0b378272..00000000 --- a/src/tools/WixToolset.HeatTasks/RefreshTask.cs +++ /dev/null | |||
| @@ -1,59 +0,0 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | namespace WixToolset.HeatTasks | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Text.RegularExpressions; | ||
| 7 | using Microsoft.Build.Framework; | ||
| 8 | using Microsoft.Build.Utilities; | ||
| 9 | |||
| 10 | /// <summary> | ||
| 11 | /// A base MSBuild task to refresh generated files. | ||
| 12 | /// </summary> | ||
| 13 | public abstract class RefreshTask : Task | ||
| 14 | { | ||
| 15 | private static readonly Regex AddPrefix = new Regex(@"^[^a-zA-Z_]"); | ||
| 16 | private static readonly Regex IllegalIdentifierCharacters = new Regex(@"[^A-Za-z0-9_\.]|\.{2,}"); // non 'words' and assorted valid characters | ||
| 17 | |||
| 18 | /// <summary>Metadata key name to turn off harvesting of project references.</summary> | ||
| 19 | protected const string DoNotHarvest = "DoNotHarvest"; | ||
| 20 | |||
| 21 | /// <summary> | ||
| 22 | /// The list of files to generate. | ||
| 23 | /// </summary> | ||
| 24 | [Required] | ||
| 25 | public ITaskItem[] GeneratedFiles { get; set; } | ||
| 26 | |||
| 27 | /// <summary> | ||
| 28 | /// All the project references in the project. | ||
| 29 | /// </summary> | ||
| 30 | [Required] | ||
| 31 | public ITaskItem[] ProjectReferencePaths { get; set; } | ||
| 32 | |||
| 33 | /// <summary> | ||
| 34 | /// Return an identifier based on passed file/directory name | ||
| 35 | /// </summary> | ||
| 36 | /// <param name="name">File/directory name to generate identifer from</param> | ||
| 37 | /// <returns>A version of the name that is a legal identifier.</returns> | ||
| 38 | /// <remarks>This is duplicated from WiX's Common class.</remarks> | ||
| 39 | protected static string GetIdentifierFromName(string name) | ||
| 40 | { | ||
| 41 | var result = IllegalIdentifierCharacters.Replace(name, "_"); // replace illegal characters with "_". | ||
| 42 | |||
| 43 | // MSI identifiers must begin with an alphabetic character or an | ||
| 44 | // underscore. Prefix all other values with an underscore. | ||
| 45 | if (AddPrefix.IsMatch(name)) | ||
| 46 | { | ||
| 47 | result = String.Concat("_", result); | ||
| 48 | } | ||
| 49 | |||
| 50 | return result; | ||
| 51 | } | ||
| 52 | |||
| 53 | protected static string GetMetadataOrDefault(ITaskItem item, string metadataName, string defaultValue) | ||
| 54 | { | ||
| 55 | var value = item.GetMetadata(metadataName); | ||
| 56 | return String.IsNullOrWhiteSpace(value) ? defaultValue : value; | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
