✅ Error when targeting .net-android
Hello,
I want to target
Error:
I want to target
net-androidnet-android, but for some reason the build fails. I am trying this from linux, and the android workload is installed.<PropertyGroup Condition="'$(BuildGroup)' == 'android'">
<TargetFrameworks>net8.0-android;net9.0-android</TargetFrameworks>
</PropertyGroup><PropertyGroup Condition="'$(BuildGroup)' == 'android'">
<TargetFrameworks>net8.0-android;net9.0-android</TargetFrameworks>
</PropertyGroup>Error:
dotnet build --configuration Release --no-restore -p:BuildGroup=android
QrCode.Generator net9.0-android failed with 1 error(s) (0.0s)
/usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file '/home/nandor/Documents/Personal/qr-code-service/src/QrCode.Generator/obj/project.assets.json' doesn't have a target for 'net9.0-android'. Ensure that restore has run and that you have included 'net9.0-android' in the TargetFrameworks for your project. dotnet build --configuration Release --no-restore -p:BuildGroup=android
QrCode.Generator net9.0-android failed with 1 error(s) (0.0s)
/usr/share/dotnet/sdk/9.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.PackageDependencyResolution.targets(266,5): error NETSDK1005: Assets file '/home/nandor/Documents/Personal/qr-code-service/src/QrCode.Generator/obj/project.assets.json' doesn't have a target for 'net9.0-android'. Ensure that restore has run and that you have included 'net9.0-android' in the TargetFrameworks for your project.