Skip to content

Commit 5c69e9b

Browse files
authored
Update NU5048.md
1 parent feac249 commit 5c69e9b

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

docs/reference/errors-and-warnings/NU5048.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ f1_keywords:
1515
<pre>The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl</pre>
1616

1717

18-
# Issue
18+
### Issue
1919

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

2222
- When creating a package from a nuspec file, it contains a `<iconUrl/>` entry.
2323
- When creating a package from a MSBuild project file, it contains a `<PackageIconUrl>` property.
2424

2525

26-
# Solution
26+
### Solution
2727

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

@@ -32,11 +32,15 @@ For MSBuild project files, add an `<PackageIcon/>` property, as follows:
3232
```xml
3333
<Project Sdk="Microsoft.NET.Sdk">
3434
<PropertyGroup>
35-
<TargetFramework>netstandard2.0</TargetFramework>
36-
<PackageIcon>icon.jpg</PackageIcon>
35+
...
36+
<PackageIcon>icon.png</PackageIcon>
37+
...
3738
</PropertyGroup>
39+
3840
<ItemGroup>
39-
<None Include="icon.jpg" Pack="true" PackagePath="" />
41+
...
42+
<None Include="images\icon.png" Pack="true" PackagePath=""/>
43+
...
4044
</ItemGroup>
4145
</Project>
4246
```
@@ -58,4 +62,4 @@ For nuspec files, add an `<icon/>` entry that points to the file that will be th
5862
</package>
5963
```
6064

61-
To learn more about embedded icons in NuGet and the Icon URL deprecation efforts, see https://aka.ms/deprecateIconUrl
65+
[Learn more about packaging an icon image file](../msbuild-targets.md#packing-an-icon-image-file).

0 commit comments

Comments
 (0)