Okay so I have observed that I had some issues since I added NUnit Test project to my solution. This was one of these issues that I had:
Whenever I opened the solution I had to comment these lines. However, I could work on my project anyways, so I wasn't bothered by it. But now I thought this could also affect scaffolding, and that was actually the issue. I have deleted the NUnit folder and project from my solution and it is working now. I do not need to have to unit tests for my project for now anyways, but leaving the comment if that would help anyone in future.