Otozinclus
.net does work with Android Studio on Mac M3
Hi! Both Android Studio and .net (via terminal) individually work on my Mac (M3 Air 24GB OSX 15). However, now I want to compile a Android GitHub project, that is based on the .net SDK and every time I try to build it, it throws out a generic "process command dotnet returns non 0 value "1"" error, or something like that
I previously build it on my Windows PC already and I got that error there as well, because the project requires v9 and I only had v8 and after updating, the error disappeared. On my Mac however, I am stuck at this error.
Any idea?
38 replies
Include files only on a specific platform
Hey! The project I am working on, uses FFmpeg, but because there is no official release of FFmpeg for Windows on Arm, I need to add an unofficial build of FFmpeg for WoA into the build folder in order for it to work. I did that by adding following code to the .csproj file and it works:
<ItemGroup>
<Content Include="ffmpeg.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="ffprobe.exe">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
However, this is totally unnecessary for any other platform but Windows Arm64, therefore my goal is that these files only get added to the build, if the user is building for WoA.
I tried that by adding a condition after the ItemGroup:
<ItemGroup Condition="'$(RuntimeIdentifier)' == 'win-arm64'">
Sadly, this does not work. It does build the project, but without these files, despite building on WoA. I then tried the opposite, excluding every other platform with != and that way it builds for WoA, but also for every other platform.
If anyone could explain why this happens, I would be very glad!
15 replies