'How to use msbuild to build net6.0-android and not generate apk?
I need use Command Line build net6 project and get dll, i use command "dotnet msbuild", but every time it will generate apk file when build Android project, apk is big,so build is slow, i want not generate apk, have any way to do it?
Solution 1:[1]
I test some command,such as dotnet msbuild and dotnet msbuild /t:Build /p:Platform="AnyCPU" /p:Configuration=Debug
Finally, I found dotnet msbuild /t:Build /p:Platform="AnyCPU" /p:Configuration=Debug /p:AndroidBuildApplicationPackage=false and set .csproj
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
</PropertyGroup>
that can just build and not generate apk.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | yangzhou |
