I have a ASP.NET Core project with some simple Razor pages and a Web API controller.
I\'m using Clean Architecture as a starting point. I\'ve renamed the project names,
I have a really simple project structure and ran into the same issue. Project structure:
-repo_root
- myProject
- myProject.csproj
- src
- myProjectTest
- myProjectTest.csproj
- tests
All of the above answers didn't work for me. I went throught the docs and other sources related to the WebApplicationFactoryContentRootAttribute to no avail. I also looked into the WebApplicationFactory implementation and tried to use the TEST_CONTENTROOT_APPNAME in settings to no avail.
What did help in the end was creating an empty myProject.sln file in the repo_root.