Skip to content

Commit 4886a78

Browse files
author
Fernando Aguilar
committed
Addressing feedback
1 parent 0f1e21a commit 4886a78

File tree

4 files changed

+38
-39
lines changed

4 files changed

+38
-39
lines changed

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

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,35 @@ NuGet is unable find the icon file in the package.
2424

2525
- Make sure that the file that is marked as the package icon exists at the source and it is readable, and the target matches the path expected by the `icon` property.
2626
- Ensure that the file is referenced in the nuspec or in the project file.
27-
* When you are creating a package from a nuspec file, make sure to include the icon file in the `<files/>` section:
28-
29-
```xml
30-
<package>
31-
<metadata>
32-
<id>sample.lib</id>
33-
<version>0.0.1</version>
34-
<authors>nuget</authors>
35-
<owners>nuget</owners>
36-
<license type="expression">MIT</license>
37-
<description>Package containing the icon file</description>
38-
<icon>icon.jpg</icon>
39-
</metadata>
40-
<files>
41-
<file src="icon.jpg" />
42-
</files>
43-
</package>
44-
```
45-
4627
* When creating a package from a MSBuild project file, make sure to reference the icon file in the project, as follows:
4728

4829
```xml
4930
<Project Sdk="Microsoft.NET.Sdk">
5031
<PropertyGroup>
51-
<TargetFramework>netstandard2.0</TargetFramework>
52-
<PackageIcon>icon.jpg</PackageIcon>
32+
<TargetFramework>netstandard2.0</TargetFramework>
33+
<PackageIcon>icon.jpg</PackageIcon>
5334
</PropertyGroup>
5435
<ItemGroup>
55-
<None Include="icon.jpg" Pack="true" PackagePath="" />
36+
<None Include="icon.jpg" Pack="true" PackagePath="" />
5637
</ItemGroup>
5738
</Project>
5839
```
40+
41+
* When you are creating a package from a nuspec file, make sure to include the icon file in the `<files/>` section:
42+
43+
```xml
44+
<package>
45+
<metadata>
46+
<id>sample.lib</id>
47+
<version>0.0.1</version>
48+
<authors>nuget</authors>
49+
<owners>nuget</owners>
50+
<license type="expression">MIT</license>
51+
<description>Package containing the icon file</description>
52+
<icon>icon.jpg</icon>
53+
</metadata>
54+
<files>
55+
<file src="icon.jpg" />
56+
</files>
57+
</package>
58+
```

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,20 @@ Icon URL is deprecated in favor of embedding the icon inside the NuGet package.
2727

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

30+
For MSBuild project files, add an `<PackageIcon/>` property, as follows:
31+
32+
```xml
33+
<Project Sdk="Microsoft.NET.Sdk">
34+
<PropertyGroup>
35+
<TargetFramework>netstandard2.0</TargetFramework>
36+
<PackageIcon>icon.jpg</PackageIcon>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<None Include="icon.jpg" Pack="true" PackagePath="" />
40+
</ItemGroup>
41+
</Project>
42+
```
43+
3044
For nuspec files, add an `<icon/>` entry that points to the file that will be the package icon:
3145

3246
```xml
@@ -46,18 +60,4 @@ For nuspec files, add an `<icon/>` entry that points to the file that will be th
4660
</package>
4761
```
4862

49-
For MSBuild project files, add an `<PackageIcon/>` property, as follows:
50-
51-
```xml
52-
<Project Sdk="Microsoft.NET.Sdk">
53-
<PropertyGroup>
54-
<TargetFramework>netstandard2.0</TargetFramework>
55-
<PackageIcon>icon.jpg</PackageIcon>
56-
</PropertyGroup>
57-
<ItemGroup>
58-
<None Include="icon.jpg" Pack="true" PackagePath="" />
59-
</ItemGroup>
60-
</Project>
61-
```
62-
6363
To learn more about embedded icons in NuGet and the Icon URL deprecation efforts, see https://aka.ms/deprecateIconUrl

docs/reference/msbuild-targets.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ When packing a license file, you need to use PackageLicenseFile property to spec
217217
<None Include="licenses\LICENSE.txt" Pack="true" PackagePath=""/>
218218
</ItemGroup>
219219
```
220+
220221
[License file sample](https://github.com/NuGet/Samples/tree/master/PackageLicenseFileExample).
221222

222223
### Packing an icon image file
@@ -235,8 +236,6 @@ For example:
235236
</ItemGroup>
236237
```
237238

238-
239-
240239
[Package Icon sample](https://github.com/NuGet/Samples/tree/master/PackageIconExample).
241240

242241
### IsTool

docs/reference/nuspec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ license-expression = 1*1(simple-expression / compound-expression / UNLICENSED)
141141
#### iconUrl
142142

143143
> [!Important]
144-
> licenseUrl is being deprecated. Use license instead.
144+
> iconUrl is being deprecated. Use icon instead.
145145
146146
A URL for a 64x64 image with transparency background to use as the icon for the package in UI display. Be sure this element contains the *direct image URL* and not the URL of a web page containing the image. For example, to use an image from GitHub, use the raw file URL like <em>https://github.com/\<username\>/\<repository\>/raw/\<branch\>/\<logo.png\></em>.
147147

0 commit comments

Comments
 (0)