Merge pull request #187 from smoogipoo/fix-dockerfile-android

Fix Dockerfile not working with multi-targeted project
This commit is contained in:
Susko3 2024-12-18 14:18:02 +01:00 committed by GitHub
commit 061ef9ebfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,12 @@ RUN apt-get update && \
WORKDIR /tmp
COPY .config/dotnet-tools.json .config/dotnet-tools.json
COPY SDL3-CS/SDL3-CS.csproj SDL3-CS/SDL3-CS.csproj
# .NET 8 installed using the distro package does not support the android workload.
# Since the project is only used for reference purposes, we'll retarget it to a single framework.
# See: https://github.com/dotnet/core/discussions/9258#discussioncomment-9548857
RUN sed -i 's/<TargetFrameworks.*$/<TargetFramework>net8.0<\/TargetFramework>/' SDL3-CS/SDL3-CS.csproj
RUN dotnet tool restore && \
dotnet restore --ucr SDL3-CS/SDL3-CS.csproj