Unsupported project type in Visual Studio

I just installed Unity Hub and Unity 2020.3.2f1 and I already had Visual Studio Community 2019 16.9.3 installed.

I created a new Unity game, added a script, and when I double click it I get this error - it says the project type is unsupported:

7005425--828305--error.png

It then tries to do a migration, which fails. If I try to use Visual Studio anyway, the project says it’s incompatible, and there’s no code completion or syntax highlighting:

7005425--828308--error2.png

I’ve spent hours googling this issue and trying every solution I’ve found, and nothing makes any difference.

Visual Studio Tools for Unity was already installed using Visual Studio Installer, but I tried uninstalling and reinstalling it, and it didn’t help.

In Edit - Preferences - External Tools, Visual Studio is selected, and I’ve tried browsing to the specific devenenv.exe, and nothing helped.

I’ve tried deleting and recreating the .csproj and .sln files. I’ve tried deleting the .vs folder. I’ve tried clicking Regenerate project files.

I’ve tried using Assets - Open C# Project.

I’ve tried uninstalling and reinstalling the Visual Studio Editor package.

At this point I’ve spent longer trying to figure this out than actually working on my game…

Hitting the same issue, and tried the same solutions. No luck.

In case this is a bug on the Visual Studio side I’ve reported it here so anyone else with the same problem can give it a vote

Don’t add files from Visual Studio. Create them from Unity. Visual Studio isn’t a necessary part of anything in Unity land. You can edit source files with whatever you care to.

Also, from Unity try Assets → Open C# project.

Also this standard stuff: This may help you with intellisense problems:

Also, try update the VSCode package inside of Unity: Window → Package Manager → Search for Visual Studio Code Editor → Press the Update button

Also, this: No suggestions in Vscode

I didn’t add files from Visual Studio, I created them in Unity, and Visual Studio is what I want to edit cs files with.

I’ve tried all of the suggestions in that first thread and the second thread is irrelevant because it’s for VS Code not VS.

Yeah, absolutely nothing whatsoever to do with Intellisense. And we know VS is not “necessary”, we just really like it (and why wouldn’t you :)).

Suspect this is a Project Guid issue of some kind, probably an easy fix, upvoted your issue in case that’s where the problem lies.

Microsoft support was able to fix this!

2 Likes

In my case, I have Visual Studio 2019 and Visual Studio 2022 both installed on my PC, and it only worked with Visual Studio 2022, never with Visual Studio 2019. Maybe the Visual Studio tools for Unity are not capable of being enabled in both version…

I had the same problem with VS 2022.
The thing that helped me was closing the project, deleting Library folder of the project and all csproj and sln files and reopening project to let it regenerate library and solution files