Arduino + Visual Studio (LDR and LED)

What I am trying to do is to control the LED from the Visual Studio interface.

Visual Studio is an application development environment. It has NO mechanism for talking to the serial port.

An application that you develop using Visual Studio MIGHT. So talk about YOUR app, not the environment that was used to develop it.

The problem is: When I want to turn the LED ON or OFF from the VS interface, it does not do anything, because there is an analog reading at that moment

That is NOT the reason why the Arduino is not turning the LED on or off. Serial data is buffered. The Arduino will read it when the function that calls the analogRead() function ends.

Where does you app open the serial port?