Visual Studio 2019 regularly loses the ability to open Unity projects (unsupported) - unity3d

Nothing was changed when all of a sudden Visual Studio 2019 suddenly couldn't open Unity 2019.2.4f1 projects.
Once it happened several months ago. That time it was cured by itself when I downloaded a clean Unity project from my repository. Just yesterday it happened again. I spend the whole day surfing forums and trying to fix but nothing helped until I decided to completely reinstall Visual Studio. Today everything was fine until suddenly it started again.
I didn't change anything, just was working with code.
External tools settings are set as they were.
Any ideas why it could happen and how to fix it without reinstalling VS?
Is it possible to somehow find out what exactly the VS can't understand in the project files?

In VS2019 go to Extensions -> Manage Extensions and check that "Visual Studio 2019 Tools for Unity" extension is installed, and enabled.

Related

Visual studio (17.3.4) update causes xamarin forms solution to go in an infinite loop

I've updated my visual studio 2022 to the latest version and now its an infinite loop trying to load my xamarin forms projects file.
It constantly tries to restore csprojects and intellisense.
I have already checked the box to install xamarin
I have uninstalled reinstalled
I have checked if there are any .net sdks are installed elsewhere
It's been 2 days I'm trying to fix this problem with no luck.

How can I investigate extensions problems with Visual Studio for Code?

When I click the Extensions I get nothing on one of my computers. I have checked the marketplace is not down. I have tried to delete the app and download a new version. Nothing helps. So are there any ways I can investigate this further? Quite frustrating to not been able to install extensions...
I'm on a Mac with Catalina 10.14.6 and I have VS for Code 1.41.1. I launched the Console app and see some messages from Electron(which I suspect is some part of VS for Code since it is mentioned in the about window) but none really makes sense.

Cannot get unity hololens project to work

I'm trying to get a project to work that i downloaded this link over here, from github.
I've followed all the (configuration) steps in the install guide and i am using the exact versions of the software as described in the guide.
The problem seems to be that some references to the Windows namespace do not work.
I've tried adding it but i can't get it done in the usual way.
The error messages i get when building in unity:
When i open the project in visual studio 2015 update 3 (after building it in unity):
It seems that the option to simply add the reference in visual studio is not present in this kind of project.
I think this shouldn't be to hard to resolve but i lack the skills and experience as i usually develop windows apps solely in visual studio.
EDIT
These are the configurations I used:
i open the project in visual studio 2015 update 3
You should use Visual Studio 2017 with the latest Win10 SDKs.

visual studio for Mac unity execution failed

I am running the latest version of Visual Studio and the latest version of unity. When I open the project using Visual Studio for Mac, I am able to rebuild the app.
But, when I try to start debugging, I am getting Execution Failed without any explanation or build output.
I am able to run the app successfully on iOS through Xcode, although the iPad is refusing to start the app automatically and I have to open it manually.
The issue is that , I can't start the app on Visual Studio for Mac.
Apparently, If you open multiple instances of Unity, Visual Studio for Mac will get confused and will not know which project to attach to.
Having one instance solved the issue for me.

Hololens device build fails to not finding Assembly-CSharp-firstpass.dll

I'm trying to build Unity application for Hololens device on Visual Studio 2017 and I'm getting the following errors:
Metadata file '...\GeneratedProjects\UWP\Assembly-CSharp-firstpass\bin\x86\Release\Assembly-CSharp-firstpass.dll' could not be found
Metadata file '...\GeneratedProjects\UWP\Assembly-CSharp\bin\x86\Release\Assembly-CSharp.dll'
I'm aware of the similar question here but uninstalling and installing the latest versions of both Unity and VS did not help. Neither did starting a completely new project. I'm using now the latest versions of Unity (2017.1.0f3) and Visual Studio 2017 (15.3.0).
I've tried uninstalling both applications. Everything was working fine yesterday but then I downloaded additional components to Visual Studio (ASP.NET) and the Hololens build stopped working. Any idea how I could fix the issue?
I can see the Assembly-CSharp-firstpass.dll in Unprocessed folder under the path it's searching for it and even tried to copy it to the correct path but it did not help. I have also tried to build the project without ticking the Unity C# Projects but I get a different error then.
Update
I found this post on Unity forums and I think it's the same issue I have: https://forum.unity3d.com/threads/net-scripting-backend-and-visual-studio-2017-3-incompatibility.487833/
A workaround for this issue is to manually modifiying The "UAP,Version=v10.0.xxx" to "UAP,Version=v10.0" In the project.lock.json files of the GeneratedProjects.
Other solutions to this problem include a downgrade to Visual Studio 2015, or using the patch that the link you provided has.