/bin/bash: line 1: ./out/[projectname].Domain: No such file or directory
I am trying to publish a .NET 7 application to railway and I'm getting the following error: /bin/bash: line 1: ./out/[projectname].Domain: No such file or directory
The build succeeds but the error shows up when it's deploying.
Thanks in advance for the help!
Project ID = 8546a8b7-d650-44fe-bdd9-6ff418e13e1b
25 Replies
Project ID:
8546a8b7-d650-44fe-bdd9-6ff418e13e1b
@aleks more .net problems 🙂
Could you send your code?
At first glance, I don't know what's going on.
First, though: are you using Nixpacks or a Dockerfile?
As far as I’m aware I’m using Nixpacks. I had to specify in the environment variables to use .net 7
I’m afraid I cannot send you any code because I’m working for a company and I cannot share any code.
Alright, understood, I'll see if I can figure out what's happening here.
Does your app use C# or F#?
We are using C#
Would it be possible for you to send the build plan table at the start of the build logs?
ofcourse, give me a sec
this?
Yep, thanks
idk why start is './out/...'
folder structure:
src folder looks like this:
env var
Hmm, I'm not 100% sure what's going on here
@neb :), you wrote the provider, sorry for the ping, but could you help?
solved the issue by creating my own dockerfile and deploying from railway-cli
Would it be possible for you to send the dockerfile that fixed it so we can improve the nixpacks provider?
I will send the dockerfile asap
though I'm facing another issue right now..
I know I need to expose my app on 0.0.0.0 and use the port
but i have no clue how to do this in .net
any ideas?
Try setting the
ASPNETCORE_URLS
environment variable to http://0.0.0.0:3000
- that's how the Nixpacks provider does it@aleks sorry for the ping, but I'm facing an issue with the CORS. This is the error: Access to XMLHttpRequest at '[api]' from origin '[application]' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Everything was working fine until this morning when I published a new version of the api. I've reverted back to the old version but the errors is the same.
Also when I change the 3000 with the PORT env var it was working but now it's not
so i placed the 3000 instead and now i'm getting CORS error
------------------------------
okay, I have managed to fix the issue
I found out that this is doing nothing
builder.WebHost.UseUrls($"http://0.0.0.0:{Environment.GetEnvironmentVariable("PORT")}");
had to do this ^^
now it's listening correctly
CORS error is also gone
Ah, alright. Glad your problems are fixed, sorry I couldn't have been of more help