This is the most obscure, odd behavior I’ve ever seen on GitHub and I am completely stuck.
Here is the repo where the following happened.
The “corrupted” branch is
refactor-ci-cd. When you try to even
dotnet restore the solution, it breaks with the following error:
Microsoft.IO.RecyclableMemoryStream.csproj(1,1): error MSB4025: The project file could not be loaded. Data at the root level is invalid. Line 1, position 1.
Steps to reproduce:
- Clone repo
- Checkout branch
dotnet restorein root folder
I copy/paste verbatim the code changes from this branch to a fresh branch and the
dotnet restore works as it should. The branch is
master branch also has those changes copy/paste in it and also works fine)
I copy/paste the original code of each of three files that were changed from the default branch on the original repo to the
refactor-ci-cd on my fork → the same error occurs.
I have not changed names, folders, paths etc.
The machine on which the command is execute don’t seem to matter, because the behavior is exactly the same locally, on a GHA runner and in a container.
My only conclusion is that the branch has somehow been corrupted and it messes with the path structure.
But is that even possible ?