Skip to content

Commit 9b9fdd0

Browse files
authored
[workloads] Put quotes around GetFileName call when collecting telemetry (#90588)
There are cases where `%(ReferencePath)` is empty, so prevent exceptions by quoting the value. Fixes #90584
1 parent a39262b commit 9b9fdd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mono/nuget/Microsoft.NET.Workload.Mono.Toolchain.Current.Manifest/WorkloadTelemetry.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
</PropertyGroup>
3939

4040
<PropertyGroup>
41-
<_WorkloadUsesOther Condition="'$([System.IO.Path]::GetFileName(%(ReferencePath.Identity)).ToLower())' == 'avalonia.dll'">true</_WorkloadUsesOther>
42-
<_WorkloadUsesOther Condition="'$([System.IO.Path]::GetFileName(%(ReferencePath.Identity)).ToLower())' == 'uno.dll'">true</_WorkloadUsesOther>
41+
<_WorkloadUsesOther Condition="'$([System.IO.Path]::GetFileName(&quot;%(ReferencePath.Identity)&quot;).ToLowerInvariant())' == 'avalonia.dll'">true</_WorkloadUsesOther>
42+
<_WorkloadUsesOther Condition="'$([System.IO.Path]::GetFileName(&quot;%(ReferencePath.Identity)&quot;).ToLowerInvariant())' == 'uno.dll'">true</_WorkloadUsesOther>
4343
<_WorkloadUsesMobileSDKOnly Condition="'$(RuntimeIdentifier)' != 'browser-wasm' and '$(UseMaui)' != 'true' and '$(_WorkloadUsesOther)' != 'true'">true</_WorkloadUsesMobileSDKOnly>
4444
</PropertyGroup>
4545
</Target>

0 commit comments

Comments
 (0)