Open akwanpdf opened 2 years ago
Does this still happen if you're only building net6.0-android
as a single $(TargetFramework)
? (remove any monoandroid
)
One thing you could try as a workaround is to add a target like:
<Target Name="_ForcePack" DependsOnTargets="Pack" AfterTargets="Build" Condition=" '$(TargetFramework)' == '' " />
Basically just forcing this new target to trigger a Pack
on the "outer" build that builds all $(TargetFrameworks)
.
Thanks for the response!
This issue does not happen when I only build net6.0-android
as a single $(TargetFramework)
. It doesn't occur when I only build monoandroid11.0
as a single $(TargetFramework)
either.
For the workaround, unfortunately when building UseJavaBinding
, the only value of TargetFramework
that ever occurs is net6.0-android
so the Pack
is never triggered. This "outer" build that builds all $(TargetFrameworks)
isn't happening in terminal (although it does occur when building in VS Mac).
Hi! Any update on this?
Describe the bug When building an Android NET6 app that uses a Xamarin.Legacy.Sdk binding library in terminal, no NuGet package is created even though
GeneratePackageOnBuild
istrue
.Meanwhile, when building an Android NET6 app that uses a Microsoft.NET.Sdk binding library in terminal, a NuGet package is properly created when
GeneratePackageOnBuild
istrue
.Steps to Reproduce the Problem I've created a minimal working example of this bug at TestXamarinLegacySdk. Please follow these steps to run the example.
Expected behavior A NuGet package should be created.
Context:
Please let me know if this is intentional behaviour, if there is anything wrong with the example, or if there is another method necessary to generate the package. Thank you.