Can't deply dotnet 7 application

Hello. I'm trying to deply my dotnet application, but I get error: undefined variable 'dotnet-sdk_7_0' error. Is net7 not supported yet ?
30 Replies
Percy
Percy2y ago
Project ID: 492b874c-18a2-4eda-a8d8-14314830411f
Satan1c
Satan1cOP2y ago
492b874c-18a2-4eda-a8d8-14314830411f
angelo
angelo2y ago
Can you try setting: NIXPACKS_CSHARP_SDK_VERSION
Satan1c
Satan1cOP2y ago
in variables ?
angelo
angelo2y ago
Yep
Satan1c
Satan1cOP2y ago
tried 7 & 7.0, but build still fails
Satan1c
Satan1cOP2y ago
may I run it from gh Releases ?
angelo
angelo2y ago
Hmmm, going to ask the team. Do you have a GH project I can use for testing?
Satan1c
Satan1cOP2y ago
not in public... but I can invite u to that existed, if u need HuTaoThink
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Satan1c
Satan1cOP2y ago
nope, still fails
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Adam
Adam2y ago
@Tangerine Please do not ping the team, especially at 3am.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Adam
Adam2y ago
The messages were blocked, but ghost pings still exist.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Satan1c
Satan1cOP2y ago
k
╔═══════════════════════════════ Nixpacks v1.3.1 ══════════════════════════════╗
║ setup │ dotnet-sdk_7_0 ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ dotnet restore ║
║──────────────────────────────────────────────────────────────────────────────║
║ build │ dotnet publish -o out -r linux-x64 -c Release --no-restore ║
║ │ -p:PublishReadyToRun=true ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ ./out/Geno ║
╚══════════════════════════════════════════════════════════════════════════════╝

╔═══════════════════════════════ Nixpacks v1.3.1 ══════════════════════════════╗
║ setup │ dotnet-sdk_7_0 ║
║──────────────────────────────────────────────────────────────────────────────║
║ install │ dotnet restore ║
║──────────────────────────────────────────────────────────────────────────────║
║ build │ dotnet publish -o out -r linux-x64 -c Release --no-restore ║
║ │ -p:PublishReadyToRun=true ║
║──────────────────────────────────────────────────────────────────────────────║
║ start │ ./out/Geno ║
╚══════════════════════════════════════════════════════════════════════════════╝

#8 [4/9] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d
#8 sha256:d217f4a7e07f513dde2ca11ae3e56480d394078a8f4e50bd577e78c4f7de3c89

#8 11.27 installing '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847-env'

#8 11.60 error: undefined variable 'dotnet-sdk_7_0'
#8 11.60
#8 11.60 at /app/.nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix:19:9:
#8 11.60
#8 11.60 18| '')
#8 11.60 19| dotnet-sdk_7_0
#8 11.60 | ^
#8 11.60 20| ];
#8 11.60 (use '--show-trace' to show detailed location information)

#8 ERROR: executor failed running [/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d]: exit code: 1
#8 [4/9] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d
#8 sha256:d217f4a7e07f513dde2ca11ae3e56480d394078a8f4e50bd577e78c4f7de3c89

#8 11.27 installing '293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847-env'

#8 11.60 error: undefined variable 'dotnet-sdk_7_0'
#8 11.60
#8 11.60 at /app/.nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix:19:9:
#8 11.60
#8 11.60 18| '')
#8 11.60 19| dotnet-sdk_7_0
#8 11.60 | ^
#8 11.60 20| ];
#8 11.60 (use '--show-trace' to show detailed location information)

#8 ERROR: executor failed running [/bin/bash -ol pipefail -c nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d]: exit code: 1
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Satan1c
Satan1cOP2y ago
HuTaoThink
context: 148468a554e10ab663fb5f8e851fe3ae
╔═══════════ Nixpacks v1.3.1 ══════════╗
║ setup │ dotnet-sdk ║
║──────────────────────────────────────║
║ install │ dotnet restore ║
║──────────────────────────────────────║
║ build │ dotnet build -c Release ║
║──────────────────────────────────────║
║ start │ dotnet run -c Release ║
╚══════════════════════════════════════╝
#1 [internal] load build definition from Dockerfile
#1 sha256:504db20524d7d4ae42c73b1f1e8fd8babda727163dc7a63834f92b0e03507a0e
#1 transferring dockerfile: 1.76kB done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:0f5b2f565e25482de1309e0aad404149ca2b5dcd74deaf1914e9e2f438ca7262
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1675123887
#3 sha256:9d31f583d9ab20c30bd28e4ececbb10e93dd12feaa73c6ea2547339b1c8114f5
#3 DONE 0.2s

#4 [stage-0 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1675123887@sha256:333533685bd20add1a7cf3f4c9142c9775e207bb13a0fb8150471182cfe78d5d
#4 sha256:cea519024678006fcf77fa980bab1c515e434288be34814c6a7883c5a535bc7a
#4 DONE 0.0s

#6 [internal] load build context
#6 sha256:30b36233ba4ff06018946b0222de30b4e3e375480efa616ab26c73ce1f51598e
#6 transferring context: 76.25kB done
#6 DONE 0.0s

#5 [stage-0 2/10] WORKDIR /app/
#5 sha256:8a2728349c4dca0cbfe99c7a43344101bf52e7b3fd086e87a928a471b6406ab9
#5 CACHED

#7 [3/9] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix
#7 sha256:106949f64bb66d7d742eb53b6bcc21f8e02ac978de9492f96e9cf85f3a6a4361
#7 CACHED

#8 [4/9] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d
#8 sha256:85345490db536165c867b9a1e4f87de051f7c54047c78067aadad6c5b9dfe061
#8 CACHED

#9 [5/9] COPY . /app/.
#9 sha256:d12ecd6630b41fdcf263bc1b970b2aa3b95e5a0bfc8f08eb4f5fbaab126de79a

#9 DONE 0.6s

#10 [6/9] RUN dotnet restore

#10 sha256:5574b1e36199c1301ff0101854756d2842cdbaaa09c4fe7dc40ff188526e1a04

#10 0.723
#10 0.725 Welcome to .NET 6.0!
#10 0.725 ---------------------
#10 0.725 SDK Version: 6.0.403

#10 1.696 Determining projects to restore...
#10 1.719 /nix/store/832ihvqk3vxgqqs5hvcyvg6bxqybky14-dotnet-sdk-6.0.403/sdk/6.0.403/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [/app/Geno.csproj]

#10 ERROR: executor failed running [/bin/bash -ol pipefail -c dotnet restore]: exit code: 1
-----
> [6/9] RUN dotnet restore:
-----
executor failed running [/bin/bash -ol pipefail -c dotnet restore]: exit code: 1

Error: Docker build failed
context: 148468a554e10ab663fb5f8e851fe3ae
╔═══════════ Nixpacks v1.3.1 ══════════╗
║ setup │ dotnet-sdk ║
║──────────────────────────────────────║
║ install │ dotnet restore ║
║──────────────────────────────────────║
║ build │ dotnet build -c Release ║
║──────────────────────────────────────║
║ start │ dotnet run -c Release ║
╚══════════════════════════════════════╝
#1 [internal] load build definition from Dockerfile
#1 sha256:504db20524d7d4ae42c73b1f1e8fd8babda727163dc7a63834f92b0e03507a0e
#1 transferring dockerfile: 1.76kB done
#1 DONE 0.0s

#2 [internal] load .dockerignore
#2 sha256:0f5b2f565e25482de1309e0aad404149ca2b5dcd74deaf1914e9e2f438ca7262
#2 transferring context: 2B done
#2 DONE 0.0s

#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1675123887
#3 sha256:9d31f583d9ab20c30bd28e4ececbb10e93dd12feaa73c6ea2547339b1c8114f5
#3 DONE 0.2s

#4 [stage-0 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1675123887@sha256:333533685bd20add1a7cf3f4c9142c9775e207bb13a0fb8150471182cfe78d5d
#4 sha256:cea519024678006fcf77fa980bab1c515e434288be34814c6a7883c5a535bc7a
#4 DONE 0.0s

#6 [internal] load build context
#6 sha256:30b36233ba4ff06018946b0222de30b4e3e375480efa616ab26c73ce1f51598e
#6 transferring context: 76.25kB done
#6 DONE 0.0s

#5 [stage-0 2/10] WORKDIR /app/
#5 sha256:8a2728349c4dca0cbfe99c7a43344101bf52e7b3fd086e87a928a471b6406ab9
#5 CACHED

#7 [3/9] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix
#7 sha256:106949f64bb66d7d742eb53b6bcc21f8e02ac978de9492f96e9cf85f3a6a4361
#7 CACHED

#8 [4/9] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d
#8 sha256:85345490db536165c867b9a1e4f87de051f7c54047c78067aadad6c5b9dfe061
#8 CACHED

#9 [5/9] COPY . /app/.
#9 sha256:d12ecd6630b41fdcf263bc1b970b2aa3b95e5a0bfc8f08eb4f5fbaab126de79a

#9 DONE 0.6s

#10 [6/9] RUN dotnet restore

#10 sha256:5574b1e36199c1301ff0101854756d2842cdbaaa09c4fe7dc40ff188526e1a04

#10 0.723
#10 0.725 Welcome to .NET 6.0!
#10 0.725 ---------------------
#10 0.725 SDK Version: 6.0.403

#10 1.696 Determining projects to restore...
#10 1.719 /nix/store/832ihvqk3vxgqqs5hvcyvg6bxqybky14-dotnet-sdk-6.0.403/sdk/6.0.403/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.TargetFrameworkInference.targets(144,5): error NETSDK1045: The current .NET SDK does not support targeting .NET 7.0. Either target .NET 6.0 or lower, or use a version of the .NET SDK that supports .NET 7.0. [/app/Geno.csproj]

#10 ERROR: executor failed running [/bin/bash -ol pipefail -c dotnet restore]: exit code: 1
-----
> [6/9] RUN dotnet restore:
-----
executor failed running [/bin/bash -ol pipefail -c dotnet restore]: exit code: 1

Error: Docker build failed
as I see... railway doesn't support pepecringe try to specify sdk again, but as I guess I'll get the first error again yep, again undefined KoloSad
angelo
angelo2y ago
Keeping an eye on this but honestly, we might not be able to do much here as we aren't super familiar with the .NET runtimes.
Satan1c
Satan1cOP2y ago
Ok, I just want to know I need to wait (how much +-) or I can just forgot about railway like a hosting option If sdk will be updated, I can see it in #📢|announcements ? Or here ?
angelo
angelo2y ago
For now, you will need to use another hosting provider.
milo
milo2y ago
okay so the issue is our regex is borked in nixpacks i will fix it can i see ur global.json? if u have a global.json can u pls send it
Satan1c
Satan1cOP2y ago
milo
milo2y ago
ty will get this fiuxed
milo
milo2y ago
GitHub
Fix SDK version parsing by Milo123459 · Pull Request #795 · railway...
This PR fixes SDK version parsing. Previously, it would spit out incorrect package names.
Satan1c
Satan1cOP2y ago
thx, now it builds HuTaoHypeHyper
angelo
angelo2y ago
tagging @five not bc of a technical reason but becuase he likes Hu Tao
milo
milo2y ago
No problem!
Want results from more Discord servers?
Add your server