Skip to content

Dev > Main#38

Merged
kzu merged 3 commits intomainfrom
dev
Dec 4, 2020
Merged

Dev > Main#38
kzu merged 3 commits intomainfrom
dev

Conversation

@kzu
Copy link
Copy Markdown
Member

@kzu kzu commented Dec 4, 2020

No description provided.

kzu added 3 commits December 2, 2020 02:40
Since you can now include arbitrary files from any package by just adding the `PackageReference` metadata attribute to packed items, we just turn on the `GeneratePathProperty` metadata for all `PackageReference`s by default, since that only incurs minimal overhead in that it will create a new `PkgPACKAGE_ID` property on nuget restore, but that's about it.

Fixes #35
When packing a package reference with PrivateAssets=all, you typically
do so in order to run the resulting code from the target pack folder
directly without having any extra dependencies that have to be resolved
from elsewhere. For this typical use case, you'll want to pack actual
"runnable" assemblies, not reference assemblies.

Packages that pack reference assemblies (typically done for netstandard)
resulted code that couldn't run because the packed assemblies contained
no code.

So we first look at related files that have a "/ref/" in the path, see
if we can find the same file but under "/lib/" and if so, pack that
instead.

Fixes #36
Sometimes it may be useful to just pack the top-level dependency from a reference (i.e. you're getting the other deps by some other means, or the environment they run on doesn't require them, such as for Microsoft.Build.Framework, say).

This allows just setting PackTransitive=false to stop the transitivity.

Fixes #37
@kzu kzu merged commit 0a08968 into main Dec 4, 2020
@kzu kzu deleted the dev branch December 4, 2020 01:04
@devlooped devlooped locked and limited conversation to collaborators Nov 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant