2 months ago
Hey, Im trying to host my layered project's backend part in railway i have used dotnet 10 built with an arm laptop
CSC : error CS2021: File name '**/*.cs' is empty, contains invalid characters, has a drive specification without an absolute path, or is too long [/src/IlkProjem.DAL/IlkProjem.DAL.csproj]
CSC : error CS2001: Source file '**/*.cs' could not be found. [/src/IlkProjem.DAL/IlkProjem.DAL.csproj]
ERROR: failed to build: failed to solve: process "/bin/sh -c dotnet publish \"IlkProjem.API/IlkProjem.API.csproj\" -c Release -o /app/publish /p:UseAppHost=false /p:EnableDefaultEmbeddedResourceItems=false" did not complete successfully: exit code: 1
These are the problems im facing: I have tried fixing the .resx file error by bypassing it, cleaning the bin/ obj/ files but i still dont get why it is happening.
Any help is appreciated. Thank you
3 Replies
Status changed to Awaiting Railway Response Railway • 2 months ago
2 months ago
hello, can you share the contents of your ilkprojem.dal.csproj file? the error shows that **/*.cs is being passed literally to the compiler instead of being expanded, which points to something in that file
Status changed to Solved kagangtp • 2 months ago
2 months ago
Sorry. It was a forgotten git tracked bin/ file under the dal. After I cleaned the files properly it got built. Thanks
Status changed to Awaiting Railway Response Railway • 2 months ago
2 months ago
classic one to miss. for anyone hitting this later, stale bin/ or obj/ folders accidentally tracked in git can cause weird build errors. always worth adding them to .gitignore and removing them with git rm -r --cached bin/ obj/ before pushing
Status changed to Solved sam-a • 2 months ago