"dotnet restore" did not complete successfully: exit code: 145

jderambureTRIAL

2 months ago

Hello,
I'm new here.
I have an error message during a deployment.

global.json

"sdk": {
      "version": "8.0.406"
    }

Railway.json

"env": {
      "DOTNET_VERSION": "8.0.406"
    },

NIXPACKS_CSHARP_SDK_VERSION = "8.0.406"

dockerfile
# Use Microsoft's .NET 8.0 SDK image

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env

# Set up the app environment

WORKDIR /app

# Copy everything and build

COPY . ./

RUN dotnet publish -c Release -o out

# Runtime image

FROM mcr.microsoft.com/dotnet/aspnet:8.0

WORKDIR /app

COPY --from=build-env /app/out .

# Start the app

ENTRYPOINT ["dotnet", "******.API.dll"]

==================================

The command could not be loaded, possibly because:

* You intended to execute a .NET application:

The application 'restore' does not exist.

* You intended to execute a .NET SDK command:

A compatible .NET SDK was not found.

Requested SDK version: 8.0.406

global.json file: /app/global.json

Installed SDKs:

Install the [8.0.406] .NET SDK or update [/app/global.json] to match an installed SDK.

Learn about SDK resolution:

https://aka.ms/dotnet/sdk-not-found

If I use this one -> 8.0.100-preview.5.23303.2, it's work. Does the overwrite not work?

Any idea ?

Thx

Closed

1 Replies

2 months ago

Hey!

This is an issue with your project/application. Unfortunately, we're unable to offer first-party support for issues unrelated to the Railway product or platform.

Other communities such as Stackoverflow might be able to help you out further.

Best,
Brody


Status changed to Awaiting User Response railway[bot] 2 months ago


Status changed to Closed brody 2 months ago


"dotnet restore" did not complete successfully: exit code: 145 - Railway Help Station