I'm pretty new to both Raspberry Pi and Linux, I have absolutely no prior experience so bear with me. My problem here is pretty annoying. What I'm trying to do is simply using VNC to control remotely the RPi through Ethernet cable. However, if my laptop is connected to internet through WiFi the error "No route to the host is known" shows up. So I have to disable my laptop WiFi, make a connection through VNC, and then re-enable my WiFi again. The same thing happen whenever I try to compile my program: disable WiFi, compile, and then re-enable WiFi. I'm sure you can understand how frustrating this is to do every single time. I have no idea how to solve problem nor what the cause may be, probably there are some conflicts over the Ethernet and my WiFi connection? Any suggestion is welcomed. Ask for any kind of information, but please, remember that I'm not a Linux expert, so I would appreciate if you can give me some instruction on how to retrieve those informations you need. Thank you everybody!
EDIT: I'm using a Raspberry Pi 3 B+ with the latest firmware installed (Stretch). These are the steps I take when I want to use VNC from my laptop (Windows 10) to connect to my RPi. Of course, VNC is installed on both my devices.
1) Turn on my RPi and connect it to my laptop through ethernet cable.
2) From laptop, open VNC and inserting my RPi IP. ID and Password are already memorized, so I don't need to insert them every time.
3) If the laptop WiFi connection is enable and running, the error shows up. In this case I disable the WiFi connection of my laptop, try to connect to the RPi and now I can access it without problem. My laptop, however, can't connect to internet in this state. So while the connection through VNC is established, I can enable the WiFi connection and navigate on the internet.
It's important to note that since I'm cross compiling from Visual Studio, the same process apply every time I want to compile my program because VS can't communicate with the device if the WiFi is enabled.