I solved this after a while by removing the generated c++ files needed from some tutorial. The tutorial needed a simple c++ file and I generated one and called it MyClass. I guess it as from previous version of UE and when migrating to version I guess it came with it which could be the cause of the issue. I personally do not need it anymore so I deleted the class and all other files in {youproject}/Source/… In mine there were only a couple of files. Started a “package project” and it is building now. I do not know why exactly but I guess when those files are there some other file needs to be in place which was not ported from older project… or something similar It works now…
Hope this can help anyone…