I am using Microsoft Visual Studio to write my code but I am not able to use VS to upload the code to my Arduino. I found a workaround but maybe I will here be able to find a solution.

Visual Micro allows me to upload the code from Visual Studio to my Arduino. When I upload code (without display interaction and no display connected) everything is fine.
When I upload code from VS with Genie interaction the project does not work. The objects can be seen on the display and I can interact with them but there is no reaction from the Arduino as if there is an communication error.

When I copy and paste the same code to the Arduino IDE and upload the code the display and the Arduino can communicate and everything works.

How can I solve this problem?