Skip to content

PackageReference is missing copy files to output feature #4837

Closed as not planned
@rainersigwald

Description

@rainersigwald

Moved from dotnet/msbuild#1880 on behalf of original poster @Ciantic.

I'm trying to use PhantomJS NuGET package, but it's not possible with PackageReference:

<PackageReference Include="PhantomJS" Version="2.1.1">
      <IncludeAssets>all</IncludeAssets>
</PackageReference>

It does not do anything. I'd expect it to copy the files inside PhantomJS package to the output directory so I could use the binary file inside the package.

I think PackageReference does not have support using packages such as PhantomJS which have no .NET code in it, just random files.

I suggest a feature to be able to copy files from a NuGET package to output directory

<PackageReference Include="PhantomJS" Version="2.1.1">
      <CopyToOutputDirectory>tools/*</CopyToOutputDirectory> <!-- new feature here -->
</PackageReference>

Note that the PhantomJS has folder called "tools" inside, that needs to be copied to output directory to make it usable in the app.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions