diff --git a/monostump.sln b/monostump.sln
index 6769e65..5418b1f 100644
--- a/monostump.sln
+++ b/monostump.sln
@@ -7,6 +7,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{E8E92FD2-B01
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "monostump", "src\monostump\monostump.csproj", "{C9FD4C6D-256F-4A5A-8C36-E20697974930}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StructuredLogger", "..\live-MSBuildStructuredLog\src\StructuredLogger\StructuredLogger.csproj", "{87DD5FC7-29C7-4CE9-B22B-2A4D6CB9B497}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -20,6 +22,10 @@ Global
{C9FD4C6D-256F-4A5A-8C36-E20697974930}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C9FD4C6D-256F-4A5A-8C36-E20697974930}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C9FD4C6D-256F-4A5A-8C36-E20697974930}.Release|Any CPU.Build.0 = Release|Any CPU
+ {87DD5FC7-29C7-4CE9-B22B-2A4D6CB9B497}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {87DD5FC7-29C7-4CE9-B22B-2A4D6CB9B497}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {87DD5FC7-29C7-4CE9-B22B-2A4D6CB9B497}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {87DD5FC7-29C7-4CE9-B22B-2A4D6CB9B497}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{C9FD4C6D-256F-4A5A-8C36-E20697974930} = {E8E92FD2-B015-4538-B999-BC13E1BEC8C7}
diff --git a/src/monostump/TaskModel.cs b/src/monostump/TaskModel.cs
index b481cd7..4454183 100644
--- a/src/monostump/TaskModel.cs
+++ b/src/monostump/TaskModel.cs
@@ -200,20 +200,27 @@ private void PopulateOutputItems(ILogger logger, Microsoft.Build.Logging.Structu
}
foreach (var child in outputItemsFolder.Children)
{
- if (child is Property property)
+ #if HAS_TASK_PARAMETER_ITEM
+ if (child is TaskParameterItem taskParameterItem)
{
- OutputItems.Add(new TaskOutputItem { Name = property.Name, IsProperty = true });
+ OutputItems.Add(new TaskOutputItem { Name = taskParameterItem.ParameterName, IsProperty = false });
}
- else if (child is Item item)
- {
- OutputItems.Add(new TaskOutputItem { Name = item.Name, IsProperty = false });
- }
- else if (child is AddItem addItem)
+ else
+ #endif
+ if (child is AddItem addItem)
{
string parameterName = GetParameterNameFromItemName(addItem.Name);
OutputItems.Add(new TaskOutputItem { Name = parameterName, IsProperty = false });
logger.LogDebug("AddItem: {ItemName} => {ParamName}", addItem.Name, parameterName);
}
+ else if (child is Property property)
+ {
+ OutputItems.Add(new TaskOutputItem { Name = property.Name, IsProperty = true });
+ }
+ else if (child is Item item)
+ {
+ OutputItems.Add(new TaskOutputItem { Name = item.Name, IsProperty = false });
+ }
else
{
logger.LogError("Unexpected node '{Node}' type {NodeType}", child.ToString(), child.GetType());
diff --git a/src/monostump/monostump.csproj b/src/monostump/monostump.csproj
index 928e3a1..9d5b0af 100644
--- a/src/monostump/monostump.csproj
+++ b/src/monostump/monostump.csproj
@@ -7,8 +7,17 @@
enable
+
+ $(DefineConstants);HAS_TASK_PARAMETER_ITEM
+
+
+
+
+
+
+
-
+