4 months ago
I have never published my mvc solutions outside of our windows server environments which is very simplistic but trying to get my solution on railway seems the hardest thing ever. can you give me a easy to follow guide to get this done. i keep getting errors.
ⓘ Deployment information is only viewable by project members and Railway employees.
3 Replies
4 months ago
Hello,
Sorry that it has been so difficult, but unfortunately I don't have any Railway specific guides on deploying an asp.net project, but fortunately, it wouldn't be Railway specific! - you just need a working Dockerfile in the root of your project and we will build with that!
I'm sure there are plenty of great resources online that you can find that will teach you how to write a Dockerfile for an asp.net application, as long as it can be ran in a linux container, then you can write a Dockerfile for it!
Best,
Brody
Status changed to Awaiting User Response railway[bot] • 4 months ago
brody
Hello,Sorry that it has been so difficult, but unfortunately I don't have any Railway specific guides on deploying an asp.net project, but fortunately, it wouldn't be Railway specific! - you just need a working Dockerfile in the root of your project and we will build with that!I'm sure there are plenty of great resources online that you can find that will teach you how to write a Dockerfile for an asp.net application, as long as it can be ran in a linux container, then you can write a Dockerfile for it!Best,Brody
4 months ago
Hi Brody, I have tried my best with every possible setting in the Dockerfile with not success. It keeps on failing with this error ([7/9] COPY . /app/.[7/9] COPY . /app/. 61ms[8/9] RUN dotnet publish --no-restore -c Release -o outMSBuild version 17.3.2+561848881 for .NET/app/WhatsappJumpUri/WhatsappJumpUri.csproj(261,3): error MSB4019: The imported project "/nix/store/0f43yfx91hg74bcp66qkbp97zv3ln27i-dotnet-sdk-6.0.413/sdk/6.0.413/Microsoft/VisualStudio/v17.0/WebApplications/Microsoft.WebApplication.targets" was not found. Confirm that the expression in the Import declaration "/nix/store/0f43yfx91hg74bcp66qkbp97zv3ln27i-dotnet-sdk-6.0.413/sdk/6.0.413/Microsoft/VisualStudio/v17.0/WebApplications/Microsoft.WebApplication.targets" is correct, and that the file exists on disk.✕ [8/9] RUN dotnet publish --no-restore -c Release -o out process "/bin/bash -ol pipefail -c dotnet publish --no-restore -c Release -o out" did not complete successfully: exit code: 1Dockerfile:23
21 | # build phase22 | COPY . /app/.23 | >>> RUN dotnet publish --no-restore -c Release -o out24 |25 |
ERROR: failed to solve: process "/bin/bash -ol pipefail -c dotnet publish --no-restore -c Release -o out" did not complete successfully: exit code: 1Error: Docker build failed). I brought in grok and claude to help with the problem but to no avail. I will appreciate any help to get this solution hosted on railway.
Status changed to Awaiting Railway Response railway[bot] • 4 months ago
4 months ago
Hello,
You are trying to use Nixpacks, I would recommend you use a Dockerfile.
Status changed to Awaiting User Response railway[bot] • 4 months ago