NuGet Warning NU5048

The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at


Icon URL is deprecated in favor of embedding the icon inside the NuGet package. Possible causes are:

  • When creating a package from a nuspec file, it contains a <iconUrl/> entry.
  • When creating a package from a MSBuild project file, it contains a <PackageIconUrl> property.


To stop seeing this warning, add an embedded icon to your package.

For MSBuild project files, add an <PackageIcon/> property, as follows:

<Project Sdk="Microsoft.NET.Sdk">

      <None Include="images\icon.png" Pack="true" PackagePath=""/>

For nuspec files, add an <icon/> entry that points to the file that will be the package icon:

    <file src="..\icon.png" target="images\" />

Learn more about packaging an icon image file.