You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a package reference with PrivateAssets=all has transitive dependencies and the project targets netstandard2.0, the transitive dependency is packed from the ref (reference assembly) folder instead of the lib folder, making the reference unusable at run-time.
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
kzu
added a commit
to devlooped/ThisAssembly
that referenced
this issue
Dec 10, 2020
If a package reference with
PrivateAssets=all
has transitive dependencies and the project targetsnetstandard2.0
, the transitive dependency is packed from theref
(reference assembly) folder instead of thelib
folder, making the reference unusable at run-time.Repro:
Package contents seems to be correct:
However, opening the System.Runtime.CompilerServices.Unsafe.dll assembly reveals it to be a reference assembly with no implementations.
The text was updated successfully, but these errors were encountered: