3 months ago
I get this error when the build is started
/nix/store/0f43yfx91hg74bcp66qkbp97zv3ln27i-dotnet-sdk-6.0.413/sdk/6.0.413/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 9.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 9.0. [/app/src/QR_BlinkShare.Application.Contracts/QR_BlinkShare.Application.Contracts.csproj]
my docker file is:
# Use .NET 9.0 SDK for building the application
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build-env
WORKDIR /src
# Force a fresh restore by copying everything at once
COPY . .
# Ensure restore always runs fresh
RUN dotnet restore --force
# Build and publish
WORKDIR /src/QR_BlinkShare.HttpApi.Host
RUN dotnet publish -c Release -o /app/out --no-restore
# Use .NET 9.0 Runtime to run the application
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS runtime
WORKDIR /app
COPY --from=build-env /app/out .
# Start the application
ENTRYPOINT ["dotnet", "QR_BlinkShare.HttpApi.Host.dll"]
3 Replies
3 months ago
I can see your recent deployments. Seems like you got it working fine now.
Status changed to Awaiting User Response railway[bot] • 3 months ago
3 months ago
este error me sale a mi pero usando
"Builder Nixpacks"
Status changed to Awaiting Railway Response railway[bot] • 3 months ago
3 months ago
I see you have recent active deployments. Seems like you got it working fine now!
Status changed to Awaiting User Response railway[bot] • 3 months ago
Status changed to Solved brody • 3 months ago