Hello,
I installed a fresh Windows 11 system and then installed:
• Unity Hub
• Unity Editor
• Visual Studio Community 2022 with “Game development with Unity” workload
Unity works normally and the project loads correctly.
However, Unity does not seem to integrate properly with Visual Studio.
Problem:
When I double-click a C# script in Unity, Visual Studio does not open.
What I already checked:
-
In Unity Preferences → External Tools
External Script Editor is set to Visual Studio. -
The “Visual Studio Editor” package is installed from Package Manager.
-
Visual Studio was installed with the “Game development with Unity” workload.
-
Restarted Unity and Visual Studio.
Despite this, scripts still do not open in Visual Studio.
Questions:
• Is there any additional Unity package required for Visual Studio integration?
• Is there a way to force Unity to regenerate the .csproj and solution files?
• Could this be related to newer Unity versions or Visual Studio updates?
Edit → Preferences → External Tools screenshot
I tried to change it to Open by file extension and then also Browse and browsed to the exe file like i saw in tutorials, but all this didn’t work. i also tried to mark more checkboxes then the two checked already by default. Registry packages , git packages and the rest and then clicked on Regenerate project files and then it did create many .csproj files in the project root folder, but nothing worked.
i also tried to create a new fresh project with a new empty script but still not working.
the MonoBehaviour is still black in the visual studio.
using UnityEngine;
public class Movements : MonoBehaviour
{
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
Unity version: [6.3 LTS (6000.3.10f1) ]
Visual Studio version: [Visual Studio 2026 Community Stable 18.3.2]
Windows version: Windows 11 pro
Any advice would be appreciated.
