You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<pre>The 'PackageIconUrl'/'iconUrl' element is deprecated. Consider using the 'PackageIcon'/'icon' element instead. Learn more at https://aka.ms/deprecateIconUrl</pre>
16
+
17
+
18
+
# Issue
19
+
20
+
Icon URL is deprecated in favor of embedding the icon inside the NuGet package. Possible causes are:
21
+
22
+
- When creating a package from a nuspec file, it contains a `<iconUrl/>` entry.
23
+
- When creating a package from a MSBuild project file, it contains a `<PackageIconUrl>` property.
24
+
25
+
26
+
# Solution
27
+
28
+
To stop seeing this warning, add an embedded icon to your package.
29
+
30
+
For nuspec files, add an `<icon/>` entry that points to the file that will be the package icon:
31
+
32
+
```xml
33
+
<package>
34
+
<metadata>
35
+
<id>sample.lib</id>
36
+
<version>0.0.1</version>
37
+
<authors>nuget</authors>
38
+
<owners>nuget</owners>
39
+
<licensetype="expression">MIT</license>
40
+
<description>Package containing the icon file</description>
41
+
<icon>icon.jpg</icon>
42
+
</metadata>
43
+
<files>
44
+
<filesrc="icon.jpg" />
45
+
</files>
46
+
</package>
47
+
```
48
+
49
+
For MSBuild project files, add an `<PackageIcon/>` property, as follows:
0 commit comments