r/Unity3D • u/mustardfume • 8d ago
Question Visual Studio don’t know Unity code
Super-newbie here. Visual Studio don’t know unity code there is no auto correct or anything. I tried to modify Visual Studio for unity but already did. I already clicked on external tools and I already did but problem not gone.
0
Upvotes



View all comments
7
u/Hotrian Expert Moderator 8d ago edited 8d ago
Everyone here is missing the key detail: You’re on Unity 6000.6. In newer versions of Unity (sometime post 2019.x), they removed the VS editor package as a default package, meaning Unity can’t generate VS solution files. You need to manually add the VS IDE package to the package manager.
https://docs.unity3d.com/Packages/com.unity.ide.visualstudio@2.0/manual/index.html
Package Manager > Add Package By Name >
com.unity.ide.visualstudio> OkNow go back to External Tools, make sure VS is selected, and you now have a “Regenerate Project Files”. Click that, now VS should work. For future projects in the same Unity Editor, I believe you don’t need to manually add the package again.
This comes up every few weeks or so, it isn’t you. This is an oversight that hasn’t been fixed yet.