I had a template ASP.NET Core app that I copied to another folder, deleted .git
folder and then updated the paths in .sln
and .csproj
files. My target framework is .NET 9.0.
The app compiles just fine both in Rider and cmd-line, but refuses to start.
Here is my folder structure details:
MyApp
MyApp.sln
App (contains ASP.NET Core project)
App.csproj
Tests (contains xUnit project)
Tests.csproj
Domain
Domain.csproj
Launching in Rider, I get just a blank output with
/...Projects/MyApp/bin/Debug/net9.0/MyApp
Process finished with exit code 137.
(which sounds like out-of-memory error, but a solution with exactly same contents starts up fine from another path)
In cmdline with dotnet run --project App
I get output about the compilation, and then it just returns to shell without any errors.
To make this weirder, when I package the whole thing in Docker container, it starts up perfectly fine. But is a bit cumbersome to do every time you test something. The only difference I see is that Dockerfile
publish command has /p:UseAppHost=false
flag set, so that must affect it.
Do you have any idea what the problem is about?
I have no idea what changed, but after a few hours of rebuild attempts and recreating git history it just started working. There were no changes to code, dependencies or solution/project files.
The only explanation I can think of is that dotnet has some per-project-guid cache somewhere that cleared at some point