Cannot remove SDK Location of Apple

I am doing a project based on both android and iOS using visual studio for mac and Xcode.

Soon after the Xcode 12.4 was released I did not install it but then later after an update in Visual Studio for mac, I had to install Xcode.

The installation was successful. But now the problem is, Visual studio cannot recognise newly installed Xcode 12.4. Whenever I open visual studio, it gives error,
"Xcode is not currently installed or could not be found."

When I checked Preferences > SDK Locations > Apple > Apple SDK, it is referring to the following path.
"/Library/Developer/CommandLineTools".

When the above path is removed, it recognises Xcode. But, when I try to build or, restart visual studio it once again try to refer the above CommadLineTools location for Xcode.

Can you guys give me a suggestion how to remove the sdk location and save, or is there any way to fix above issue.

Really appreciate your help.
It sounds like you may not have installed Xcode's Command Line Tools.

These are not automatically installed with Xcode, you have to do a download from Apple Dev:
https://developer.apple.com/download/more/
(Make sure you get the Tools for the correct version of Xcode!)

In Terminal, you can check the location of the Command Line Tools (if installed) with:
xcode-select -p
Cannot remove SDK Location of Apple
 
 
Q