diff --git a/src/NuGetizer.Tasks/NuGetizer.Inference.targets b/src/NuGetizer.Tasks/NuGetizer.Inference.targets
index c6a90d98..0c4423ac 100644
--- a/src/NuGetizer.Tasks/NuGetizer.Inference.targets
+++ b/src/NuGetizer.Tasks/NuGetizer.Inference.targets
@@ -290,7 +290,7 @@ Copyright (c) .NET Foundation. All rights reserved.
<_ExistingReadme Include="@(Content -> WithMetadataValue('Filename', '$(PackageReadmeFilename)'))" Condition="'@(_ExistingReadme)' == ''" />
<_ExistingReadme Include="$(MSBuildProjectDirectory)\$(PackageReadmeFilename)$(PackageReadmeExtension)" Condition="'@(_ExistingReadme)' == '' and Exists('$(MSBuildProjectDirectory)\$(PackageReadmeFilename)$(PackageReadmeExtension)')" />
-
@@ -306,15 +306,13 @@ Copyright (c) .NET Foundation. All rights reserved.
- <_ExistingIcon Include="@(None -> WithMetadataValue('Filename', '$(PackageReadmeFilename)'))" />
+ <_ExistingIcon Include="@(None -> WithMetadataValue('Filename', '$(PackageIconFilename)'))" />
+ <_ExistingIcon Include="@(Content -> WithMetadataValue('Filename', '$(PackageIconFilename)'))" Condition="'@(_ExistingIcon)' == ''" />
+ <_ExistingIcon Include="$(MSBuildProjectDirectory)\$(PackageIconFilename)$(PackageIconExtension)" Condition="'@(_ExistingIcon)' == '' and Exists('$(MSBuildProjectDirectory)\$(PackageIconFilename)$(PackageIconExtension)')" />
- <_ExistingReadme Include="@(None -> WithMetadataValue('Filename', '$(PackageReadmeFilename)'))" />
- <_ExistingReadme Include="@(Content -> WithMetadataValue('Filename', '$(PackageReadmeFilename)'))" Condition="'@(_ExistingReadme)' == ''" />
- <_ExistingReadme Include="$(MSBuildProjectDirectory)\$(PackageReadmeFilename)$(PackageReadmeExtension)" Condition="'@(_ExistingReadme)' == '' and Exists('$(MSBuildProjectDirectory)\$(PackageReadmeFilename)$(PackageReadmeExtension)')" />
-
-
+ Condition="'%(Extension)' == '$(PackageIconExtension)'" />