Sitelet https://github.com/fsprojects/Paket/issues/851
Skip to content

Paket pack: Duplicate files being archived when specified multiple times in templates #851

Description

@eiriktsarpalis

I came across an issue where files being specified more than once result in the same file being included multiple times in the nupkg archive. The behaviour can be reproduced using this commit. For instance, In FsPickler.fsproj, the paket template contains the following declarations:

type project
id FsPickler
...
files
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.pdb ==> lib/net45
    ../../bin/FsPickler.xml ==> lib/net45
    ../../bin/net40/FsPickler.dll ==> lib/net40
    ../../bin/net40/FsPickler.pdb ==> lib/net40
    ../../bin/net40/FsPickler.xml ==> lib/net40

This will cause the net45 FsPickler.dll to be bundled twice, but not the same for net40.
screen shot 2015-06-01 at 15 45 54
The obvious fix here would be to omit the net45 declarations, but I would prefer the explicitness of the current version.

Taking this issue to the extreme, it is possible to do the following:

files
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45
    ../../bin/FsPickler.dll ==> lib/net45

which yields the following result:
screen shot 2015-06-01 at 15 50 44

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions