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
Building with a package reference marked with "PrivateAssets="all"" removes the assemblies from the apk.
It's not a blocking issue, as the PrivateAssets metadata is not useful in the context of a app's head project, but it can be a failure hard to troubleshoot.
To Reproduce
Create a net6-android app, add a nuget package reference with PrivateAssets="all" and use types from the package's assemblies.
At runtime, the assemblies from the package will fail to load.
Further technical details
Similar behavior in a console app:
dotnet new console
dotnet add package Newtonsoft.Json
# manually add PrivateAssets="all"
dotnet publish -c Release -r win-x64 --self-contained
ls bin\Release\net7.0\win-x64\publish\Newtonsoft.*
Thus we are not sure if this is "by design" or not.
The text was updated successfully, but these errors were encountered:
That's something that the SDK does specially for publish. To my knowledge, PrivateAssets=all is basically being implemented as Private="true", which isn't ideal.
From a NuGet perspective, I don't think any big side-effects if the SDK were to change that, and personally I think that should be done, but unfortunately it'd be a great change.
I don't understand the publish scenario well enough to recommend that it should be done.
Describe the bug
Moving from: dotnet/android#6674
Respond to @jeromelaban
Building with a package reference marked with "
PrivateAssets="all"
" removes the assemblies from the apk.It's not a blocking issue, as the
PrivateAssets
metadata is not useful in the context of a app's head project, but it can be a failure hard to troubleshoot.To Reproduce
Create a net6-android app, add a nuget package reference with
PrivateAssets="all"
and use types from the package's assemblies.At runtime, the assemblies from the package will fail to load.
Further technical details
Similar behavior in a console app:
Thus we are not sure if this is "by design" or not.
The text was updated successfully, but these errors were encountered: