I managed to solve the problem. As I said, the problem was in the IDE. Solution: Go on the Edit
menu and select Preferences, then go to projects and select Build, uncheck the option “Build with MSBuild instead of xbuild (EXPERIMENTAL)”. This worked for me, I hope this works for others who are experiencing the same problem.