Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Allow additional files in the nupkg #848

Closed
bricelam opened this issue Nov 3, 2014 · 9 comments · Fixed by #2561
Closed

Allow additional files in the nupkg #848

bricelam opened this issue Nov 3, 2014 · 9 comments · Fixed by #2561

Comments

@bricelam
Copy link
Contributor

bricelam commented Nov 3, 2014

Similar to a nuspec file, project.json should allow you to specify additional files to include in the nupkg. I imagine a format like the following.

{
    "files": {
        "tools/EntityFramework.psd1": "tools/",
        "tools/EntityFramework.psm1": "tools/",
        "tools/init.ps1": "tools/"
    }
}

We currently do this post-build on the following packages.

  • EntityFramework.Commands
  • Microsoft.Data.SQLite
@bricelam
Copy link
Contributor Author

bricelam commented Dec 3, 2014

BTW, this is a different way of asking for #45

@bricelam
Copy link
Contributor Author

Ping... our workaround depends on an external-to-DNX solution that leverages WindowsBase.dll. This means you can't build a valid Microsoft.Data.Sqlite package without Desktop .NET/Mono.

@muratg
Copy link
Contributor

muratg commented Jun 26, 2015

@davidfowl I don't think you're looking into this. Could you move to another milestone (or in 1.0.0 backlog?)

@analogrelay
Copy link
Contributor

I prefer putting the destination on the left, and I'd like to see if we can get globbing in there. We'll be talking about this in the design meeting today.

@bricelam
Copy link
Contributor Author

W00t! We have workarounds in EntityFramework and in Microsoft.Data.Sqlite for this...

@analogrelay
Copy link
Contributor

Initial design notes. We're going to iterate on it tomorrow. /cc @davidfowl

{
    "packageFiles": {
        "dest": "src"
    }
}

I think that the "source" file specifier needs to be able to be an array. Basically, if the thing on the right ends up evaluating to multiple file names, the thing on the left is a folder. Otherwise, the thing on the left is a file and must have the full name of the file. Because the body of this property is a JSON dictionary, we are restricted to only having one entry per destination.

{
    "packageFiles": {
        "test": ["a.txt", "b.txt"],
        "README.md": "docs/README.md"
    }
}

@MiguelAlho
Copy link

This is just about how to add files to the generated nupkg, but not about how they will be consumed, right?

@davidfowl
Copy link
Member

@MiguelAlho That's correct.

@analogrelay
Copy link
Contributor

Additional design notes:

  • We want the project to be able to fully behave like a package, so any files specified in this section should be available when referencing the project. For example, if a native binary is specified using this property, that binary should be placed in the correct lock-file section.

@Eilon Eilon modified the milestones: 1.0.0-beta8, 1.0.0-beta7 Aug 12, 2015
analogrelay added a commit to aspnet/FileSystem that referenced this issue Aug 20, 2015
analogrelay added a commit to aspnet/FileSystem that referenced this issue Aug 20, 2015
analogrelay added a commit to aspnet/FileSystem that referenced this issue Aug 27, 2015
analogrelay added a commit to aspnet/FileSystem that referenced this issue Aug 27, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants