David Greaves
David Greaves

Reputation: 303

Unity solution not compatible with visual studio

Since updating to the most recent version of Unity 5.4.0f3, whenever I doubleclick on a script, it launches both Visual Studio and Monodevelop, but I get an error saying that the this version of VS (Community 2015) is unable to open my project. Monodevelop displays it's own, somewhat less clear error message. Please see the screen shots below.

I can still manually open my script using Visual Studio's file menu, but the intellisense code completion no longer works. Anyone know how to fix this? I have Visual Studio's Tools for Unity installed.

Visual Studio Error Migration Report

Upvotes: 9

Views: 16548

Answers (6)

Thomas Weller
Thomas Weller

Reputation: 59259

The extension "Visual Studio 2019 Tools for Unity" seems no longer available for download via the extension manager. Luckily I recalled that I saw some game development features in the Visual Studio installer, so I picked that one:

Visual Studio Installer

It works for VS 2019 (16.11.11) and VS 2022 (17.2.0 Preview 1).

Upvotes: 0

Hemaolle
Hemaolle

Reputation: 2138

For me it was enough to right click the solution in Solution Explorer and run "Resolve errors".

Upvotes: 3

Fatih Mar
Fatih Mar

Reputation: 2500

Please try following steps:

  • Delete old *.csproj and *.sln files on project's root folder
  • Check "Edit > Preferences > External Tools" and make sure you've selected "Visual Studio"
  • Re-open solution by "Assets > Open C# Project" menu

Upvotes: 8

imM4TT
imM4TT

Reputation: 282

I will complete what is said above. I experienced this issue today and it took me a while. In my case it was relative to a new install of the Unity Editor. For some unknown reason the unity tool used on VS (intellisense) was uninstalled. I had to reinstall this : open Visual Studio Installer, select your project and reach the Gaming section where reside the tool for Unity.

Upvotes: 0

Yuli Levtov
Yuli Levtov

Reputation: 109

I was having similar issues when doing a clean download of an existing Unity project onto a fresh install of Visual Studio Community 2019.

In the end the issue for me was that, although the correct version of VS Tools for Unity was installed, it was 'Disabled' by default in VS's Manage Extensions dialog (Extensions -> Manage Extensions). Just had to click 'Enable', restart Visual Studio, and all worked as expected again.

VS 'Manage Extensions' dialog

Upvotes: 10

David Greaves
David Greaves

Reputation: 303

Turns out it was an issue with my existing install of Visual Studio Tools for Unity (VSTU).

I found a thread where users had experienced similar problems due to an unsupported version of VSTU running on Unity5.2 and beyond. Unity 5.2+ requires VSTU 2.1 or later for VS to work correctly with Unity, more information for anyone interested is available in the documentation here.

I had VSTU 2.3 installed, but removing and reinstalling VSTU resolved the issue, so there must have been a problem with my install. If anyone else has this or a similar issue you can download the latest installer for VSTU here. Thanks to all who chimed in your responses helped me look in the right place!

Upvotes: 8

Related Questions