ARTICLE AD BOX
I have a main project of type console, and it references other library-type projects in the application. When I build the solution, it compiles normally, but when I run it in debug mode, it tries to launch the web application, and then it fails with this error:
"Could not load file or assembly 'MyProjetct, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified."
At first, I thought the console project might be missing the reference to that library project, but when I checked the .csproj, it is referenced correctly.
Then I thought the issue might be with the NuGet packages, because the console project doesn’t contain all the packages I installed in the library projects. But even after adding all those packages to the console project, the issue remained.
Next, I checked the bin/net8.0 folder to see if the .dll files were being generated there, and they were.
Finally, I tried running the application using dotnet run in the terminal, but then I got a different error saying it couldn’t recognize a JSON format in my appsettings.json. I checked that file several times and it’s perfectly valid — no syntax errors.
