Skip to content

Commit 1e62fd6

Browse files
committed
add Configuration to telemetry + fix tests
1 parent cb3a23b commit 1e62fd6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Copyright (c) .NET Foundation. All rights reserved.
137137
<TFTelemetry Include="TargetPlatformIdentifier" Value="$(TargetPlatformIdentifier)" />
138138
<TFTelemetry Include="UseMonoRuntime" Value="$(UseMonoRuntime)" />
139139
<TFTelemetry Include="PublishAot" Value="$(PublishAot)" />
140-
140+
<TFTelemetry Include="Configuration" Value="$(Configuration)" />
141141
</ItemGroup>
142142
<AllowEmptyTelemetry EventName="targetframeworkeval" EventData="@(TFTelemetry)" />
143143
</Target>

test/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildANetCoreAppForTelemetry.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void It_collects_TargetFramework_version_and_other_properties()
3232
buildCommand
3333
.Execute(TelemetryTestLogger)
3434
.StdOut.Should()
35-
.Contain($"{{\"EventName\":\"targetframeworkeval\",\"Properties\":{{\"TargetFrameworkVersion\":\".NETCoreApp,Version=v{ToolsetInfo.CurrentTargetFrameworkVersion}\",\"RuntimeIdentifier\":\"null\",\"SelfContained\":\"null\",\"UseApphost\":\"null\",\"OutputType\":\"Library\",\"UseArtifactsOutput\":\"null\",\"ArtifactsPathLocationType\":\"null\",\"TargetPlatformIdentifier\":\"null\",\"UseMonoRuntime\":\"null\",\"PublishAot\":\"null\"}}");
35+
.Contain($"{{\"EventName\":\"targetframeworkeval\",\"Properties\":{{\"TargetFrameworkVersion\":\".NETCoreApp,Version=v{ToolsetInfo.CurrentTargetFrameworkVersion}\",\"RuntimeIdentifier\":\"null\",\"SelfContained\":\"null\",\"UseApphost\":\"null\",\"OutputType\":\"Library\",\"UseArtifactsOutput\":\"null\",\"ArtifactsPathLocationType\":\"null\",\"TargetPlatformIdentifier\":\"null\",\"UseMonoRuntime\":\"null\",\"PublishAot\":\"null\",\"Configuration\":\"Debug\"}}");
3636
}
3737

3838
[CoreMSBuildOnlyFact]
@@ -60,10 +60,10 @@ public void It_collects_multi_TargetFramework_version_and_other_properties()
6060
result
6161
.StdOut.Should()
6262
.Contain(
63-
"{\"EventName\":\"targetframeworkeval\",\"Properties\":{\"TargetFrameworkVersion\":\".NETFramework,Version=v4.6\",\"RuntimeIdentifier\":\"null\",\"SelfContained\":\"null\",\"UseApphost\":\"null\",\"OutputType\":\"Library\",\"UseArtifactsOutput\":\"null\",\"ArtifactsPathLocationType\":\"null\",\"TargetPlatformIdentifier\":\"null\",\"UseMonoRuntime\":\"null\",\"PublishAot\":\"null\"}}")
63+
"{\"EventName\":\"targetframeworkeval\",\"Properties\":{\"TargetFrameworkVersion\":\".NETFramework,Version=v4.6\",\"RuntimeIdentifier\":\"null\",\"SelfContained\":\"null\",\"UseApphost\":\"null\",\"OutputType\":\"Library\",\"UseArtifactsOutput\":\"null\",\"ArtifactsPathLocationType\":\"null\",\"TargetPlatformIdentifier\":\"Windows\",\"UseMonoRuntime\":\"null\",\"PublishAot\":\"null\",\"Configuration\":\"Debug\"}")
6464
.And
6565
.Contain(
66-
$"{{\"EventName\":\"targetframeworkeval\",\"Properties\":{{\"TargetFrameworkVersion\":\".NETCoreApp,Version=v{ToolsetInfo.CurrentTargetFrameworkVersion}\",\"RuntimeIdentifier\":\"null\",\"SelfContained\":\"null\",\"UseApphost\":\"null\",\"OutputType\":\"Library\",\"UseArtifactsOutput\":\"null\",\"ArtifactsPathLocationType\":\"null\",\"TargetPlatformIdentifier\":\"null\",\"UseMonoRuntime\":\"null\",\"PublishAot\":\"null\"}}");
66+
$"{{\"EventName\":\"targetframeworkeval\",\"Properties\":{{\"TargetFrameworkVersion\":\".NETCoreApp,Version=v{ToolsetInfo.CurrentTargetFrameworkVersion}\",\"RuntimeIdentifier\":\"null\",\"SelfContained\":\"null\",\"UseApphost\":\"null\",\"OutputType\":\"Library\",\"UseArtifactsOutput\":\"null\",\"ArtifactsPathLocationType\":\"null\",\"TargetPlatformIdentifier\":\"null\",\"UseMonoRuntime\":\"null\",\"PublishAot\":\"null\",\"Configuration\":\"Debug\"}}");
6767
}
6868
}
6969
}

0 commit comments

Comments
 (0)