Paket: Support PrivateAssets in NuGet packages

Created on 26 May 2017  路  9Comments  路  Source: fsprojects/Paket

Support PrivateAssets and dependencies who are marked as developmentDependency

  • [ ] developmentDependency
  • [ ] PrivateAssets
bug dotnesdk

Most helpful comment

@forki But where does this come from? paket.references? So what (from a users standpoint) needs to be changed to make a dependency a private asset? Do we have docs around that?

All 9 comments

original by @matthid

Paket.Core depends on FSharp.NET.Sdk

It probably shouldn't, see https://www.nuget.org/packages/Paket.Core
Interestingly I think this "bug" makes it possible for all the other projects to build with msbuild 15.

We probably need a way to mark a dependency as "compile-time" only.

/cc @forki @enricosada

Good catch.
It shoudnt.
That's the privateassets=all part

Paket should implement something similar to the privateassets spec of packagereference.
That's used for analyzes, compile time stuff (like test lib helpers) etc
And is written in the nuspec too

More info (via @enricosada, thanks):

https://github.com/NuGet/Home/wiki/PackageReference-Specification

https://docs.microsoft.com/en-us/nuget/schema/nuspec#dependencies

PrivateAsset leads to include attribute:

grafik

I think this needs to be a transitive setting, but we should first check that with dotnet cli.

Any chance for this? Currently it's effectively impossible for me package with neither dotnet pack nor paket pack because of #3191.

The former adds development dependencies to nupkg and the latter only packages one target. Please don't force me to use csproj dependencies :)

EDIT
I guess I can still use type file to define entire package manually. I guess this will do for now...

@matthid we already have private assets. What's still to do here?

And how? We can close this if we add a link to the docs :)

image

@forki But where does this come from? paket.references? So what (from a users standpoint) needs to be changed to make a dependency a private asset? Do we have docs around that?

@matthid It looks like forki resolved this here:
https://github.com/fsprojects/Paket/commit/85f3c9e0ad1b6fe0138a2432aec5c8b7d5cc0b56
The syntax is to add copy_local:true in the paket.dependencies file.

I believe it is documented here:
https://fsprojects.github.io/Paket/dependencies-file.html#Controlling-whether-assemblies-should-be-copied-to-the-output-directory-during-build

Was this page helpful?
0 / 5 - 0 ratings