Search Issue Tracker


Fixed in 1.2.3



Found in [Package]


Issue ID




[VSCode] C# Solution/Project doesn't update the Editor path when using a different Editor version or changing path

Package: VS Code


How to reproduce:
1. Create a new project (with the default 3D template)
2. In the Package Manager, import the Visual Studio Code Editor package
3. Go to the Preferences (Unity -> Preferences)
4. In the External Tools tab select VS Code as the External Editor
5. Regenerate project files
6. Create a new C# Script
7. Open the Script
8. Inspect there are no compilation errors
9. Close the project
10. Modify the Unity Editor folder name
11. Open the same project with the Editor from the modified path
12. Open the previously created C# Script

Expected result: There are no errors in the Script
Actual result: MonoBehaviour could not be found

Reproducible with: 1.2.3 (2019.4.21f1, 2020.2.6f1, 2021.1.0a4)
Not reproducible with: 1.2.3 (2021.1.0a5, 2021.1.0b8, 2021.2.0a6)
Couldn't test with Unity 2018.4.32f1 (Visual Studio Code Editor package is not available)

- Regenerating project files fixes the issue
- Unity 2018.4.32f1 doesn't have a "Regenerate project files" option available, so C# project files must be deleted manually for a workaround

  1. Resolution Note (fix version 1.2.3):

    Fixed in Visual Studio Code Editor 1.2.3

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.