You can build a dotnet core app on a 64-bit Linux machine for running on a 32-bit Raspberry PI.
My dockerfile ran the following command (note the -r parameter):
RUN dotnet publish -c Release -o out -r linux-arm
I did get one error when building it though:
C:\Source Code\GitHub\buyers-remorse-containers\src\BuyersRemorseService\BuyersRemorseService\BuyersRemorseService.csproj :
error NU1605: Detected package downgrade: Microsoft.Win32.Primitives from 4.3.0 to 4.0.1.
Reference the package directly from the project to select a different version.
C:\Source Code\GitHub\buyers-remorse-containers\src\BuyersRemorseService\BuyersRemorseService\BuyersRemorseService.csproj : error NU1605: BuyersRemorseService -> Microsoft.Azure.ServiceBus 2.0.0 -> Microsoft.Azure.Amqp 2.1.2 -> System.Net.WebSockets.Client 4.0.0 -> System.Net.Primitives 4.0.11 -> runtime.unix.System.Net.Primitives 4.3.0 -> Microsoft.Win32.Primitives (>= 4.3.0)
C:\Source Code\GitHub\buyers-remorse-containers\src\BuyersRemorseService\BuyersRemorseService\BuyersRemorseService.csproj : error NU1605: BuyersRemorseService -> Microsoft.Win32.Primitives (>= 4.0.1)
And the solution was to edit the .csproj and manually insert the following line:
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
No comments:
Post a Comment