Skip to content

Commit f30f750

Browse files
authored
Update NU5048.md
1 parent 606fa62 commit f30f750

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed

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

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,19 +29,17 @@ To stop seeing this warning, add an embedded icon to your package.
2929

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

32-
```xml
32+
```xml
3333
<package>
3434
<metadata>
35-
<id>sample.lib</id>
36-
<version>0.0.1</version>
37-
<authors>nuget</authors>
38-
<owners>nuget</owners>
39-
<license type="expression">MIT</license>
40-
<description>Package containing the icon file</description>
41-
<icon>icon.jpg</icon>
35+
...
36+
<icon>images\icon.png</icon>
37+
...
4238
</metadata>
4339
<files>
44-
<file src="icon.jpg" />
40+
...
41+
<file src="..\icon.png" target="images\" />
42+
...
4543
</files>
4644
</package>
4745
```
@@ -51,13 +49,11 @@ For MSBuild project files, add an `<PackageIcon/>` property, as follows:
5149
```xml
5250
<Project Sdk="Microsoft.NET.Sdk">
5351
<PropertyGroup>
54-
<TargetFramework>netstandard2.0</TargetFramework>
55-
<PackageIcon>icon.jpg</PackageIcon>
52+
<PackageIcon>icon.png</PackageIcon>
5653
</PropertyGroup>
54+
5755
<ItemGroup>
58-
<None Include="icon.jpg" Pack="true" PackagePath="" />
56+
<None Include="images\icon.png" Pack="true" PackagePath=""/>
5957
</ItemGroup>
6058
</Project>
61-
```
62-
63-
To learn more about embedded icons in NuGet and the Icon URL deprecation efforts, see https://aka.ms/deprecateIconUrl
59+
```

0 commit comments

Comments
 (0)