Visual studio isnt working with ue4

ive tried everything i could to get it to work but ue4 doent detect vs2019 or 2017. ive removed all regkeys and files related to unreal engine and visual studio. I then reinstalled them and they still dont work