Sometimes as a developer you stuck in some very tricky problems, especially as an visual studio developer. So best way is to downgrade to an older version of XCode.
First of all, you must delete/deinstall the old XCode. Go ahead into the applications folder (Click on Finder icon > On the Sidebar, you’ll find “Applications”, click on it ), delete the Xcode icon. Just simply drag the icon into the trash. That will remove Xcode from your system completely. Restart your mac!
Now just go to https://developer.apple.com/download/more/ and search for “XCode“. You get now a list of all previously XCode releases. Pick the one you need and download and install it. You need an Apple ID to login to that portal.