I've recently started using PostSharp for caching on a .NET 5 app and it's working phenomenally on my 2015 MacBook Pro (Intel). However, I just recently got an M1 Mac Mini, which has Apple's own M1 chipset (linux-arm64), and, unfortunately, I am not able to build the solution anymore. The error I'm getting is:
#19 8.572 /root/.nuget/packages/postsharp/6.9.8/build/PostSharp.targets(381,5): error : This version of PostSharp does not support linux-arm64 runtime. [/src/Infrastructure/Infrastructure.csproj]
#19 8.586
#19 8.586 Build FAILED.
#19 8.586
#19 8.586 /root/.nuget/packages/postsharp/6.9.8/build/PostSharp.targets(381,5): error : This version of PostSharp does not support linux-arm64 runtime. [/src/Infrastructure/Infrastructure.csproj]
#19 8.586 0 Warning(s)
#19 8.586 1 Error(s)
#19 8.586
#19 8.586 Time Elapsed 00:00:08.05
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c dotnet build -c Release -o /app]: exit code: 1
My current project file indicates the following dependencies:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Application\Application.csproj" />
</ItemGroup>
<ItemGroup>
...
<PackageReference Include="PostSharp" Version="6.9.8" />
<PackageReference Include="PostSharp.Patterns.Caching" Version="6.9.8" />
<PackageReference Include="PostSharp.Patterns.Caching.Redis" Version="6.9.8" />
...
</ItemGroup>
</Project>
It looks like there isn't a linux-arm64 build for PostSharp on Nuget. They do indicate support for macOS 10.14 in their docs here, but not anything about support for M1 Macs.
Is there a way to get a linux-arm64 build of PostSharp (even if I have to build from source myself)?