Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/content/template-files.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ field of the same name in the `.nupkg`.
* `readme`: This is a path to a readme file *in* the package. It should be added with the `files` block (see below).
* `language`
* `projectUrl`
* `iconUrl`
* `iconUrl` (deprecated by NuGet)
* `icon` This is a path to an image file *in* the package. It should be added with the `files` block (see below).
* `licenseExpression`: More info on what you can specify: <https://docs.microsoft.com/de-de/nuget/reference/nuspec#license>
* `licenseUrl` (deprecated by NuGet)
* `repositoryType`
Expand Down
1 change: 1 addition & 0 deletions src/Paket.Core/Packaging/NupkgWriter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ module internal NupkgWriter =

(!!?) "projectUrl" optional.ProjectUrl
(!!?) "iconUrl" optional.IconUrl
(!!?) "icon" optional.Icon
if optional.RequireLicenseAcceptance then
!! "requireLicenseAcceptance" "true"
!! "description" core.Description
Expand Down
1 change: 1 addition & 0 deletions src/Paket.Core/PaketConfigFiles/ProjectFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2095,6 +2095,7 @@ type ProjectFile with
Language = prop "Langauge"
ProjectUrl = prop "ProjectUrl"
IconUrl = prop "IconUrl"
Icon = prop "Icon"
LicenseExpression = prop "LicenseExpression"
LicenseUrl = prop "LicenseUrl"
Copyright = prop "Copyright"
Expand Down
3 changes: 3 additions & 0 deletions src/Paket.Core/PaketConfigFiles/TemplateFile.fs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ type OptionalPackagingInfo =
Language : string option
ProjectUrl : string option
IconUrl : string option
Icon : string option
LicenseExpression : string option
LicenseUrl : string option
RepositoryUrl : string option
Expand Down Expand Up @@ -183,6 +184,7 @@ type OptionalPackagingInfo =
RepositoryBranch = None
RepositoryCommit = None
IconUrl = None
Icon = None
Copyright = None
RequireLicenseAcceptance = false
Tags = []
Expand Down Expand Up @@ -543,6 +545,7 @@ module internal TemplateFile =
Language = get "language"
ProjectUrl = get "projectUrl"
IconUrl = get "iconUrl"
Icon = get "icon"
RepositoryType = get "repositoryType"
RepositoryUrl = get "repositoryUrl"
RepositoryBranch = get "repositoryBranch"
Expand Down
2 changes: 2 additions & 0 deletions tests/Paket.Tests/Packaging/NuspecWriterSpecs.fs
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ let ``should not serialize all properties``() =
<license type="expression">MIT</license>
<projectUrl>http://www.somewhere.com</projectUrl>
<iconUrl>http://www.somewhere.com/Icon</iconUrl>
<icon>some/icon.png</icon>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<description>A description</description>
<summary>summary</summary>
Expand Down Expand Up @@ -397,6 +398,7 @@ second line</releaseNotes>
ProjectUrl = Some "http://www.somewhere.com"
LicenseExpression = Some "MIT"
IconUrl = Some "http://www.somewhere.com/Icon"
Icon = Some "some/icon.png"
Copyright = Some "Paket owners 2015"
RequireLicenseAcceptance = true
References = ["file1.dll";"file2.dll"]
Expand Down
3 changes: 3 additions & 0 deletions tests/Paket.Tests/Packaging/TemplateFileParsing.fs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ projectUrl
http://github.com/fsprojects/Chessie
iconUrl
https://raw.githubusercontent.com/fsprojects/Chessie/master/docs/files/img/logo.png
icon
some/icon.png
licenseExpression
Unlicense
requireLicenseAcceptance
Expand Down Expand Up @@ -199,6 +201,7 @@ let ``Optional fields are read`` (fileContent : string) =
sut.Summary |> shouldEqual (Some "Railway-oriented programming for .NET")
sut.Readme |> shouldEqual (Some "README.md")
sut.IconUrl |> shouldEqual (Some "https://raw.githubusercontent.com/fsprojects/Chessie/master/docs/files/img/logo.png")
sut.Icon |> shouldEqual (Some "some/icon.png")
sut.LicenseExpression |> shouldEqual (Some "Unlicense")
sut.ProjectUrl |> shouldEqual (Some "http://github.com/fsprojects/Chessie")
sut.Tags |> shouldEqual ["rop";"fsharp";"F#"]
Expand Down