Hi Name368,
The issue with Visual Studio opening twice when trying to open a code class from the Editor has already been reported in UE-51608.
What is the exact error message that you are seeing when you try to build a code project in Visual Studio?