Visual Studio break all references

So I did the error of updating Visual Studio to the latest recommended version. (17.11.0)
This broke instantly Unity pairing.
Can no more use Unity types, they all display in white and do not pop in intellisense.
Compiler throw +7000 erros related to unknow types/namespaces.

I have this error that appears sometime :
Unable to join player connection multicast group (err: 10013).

and sometime also this warning :

Unable to use UDP port 56658 for VS/Unity messaging. You should check if another process is already bound to this port or if your firewall settings are compatible.
UnityEngine.Debug:LogWarning (object)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration/<>c:<.cctor>b__6_0 () (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.22/Editor/VisualStudioIntegration.cs:55)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration/<>c__DisplayClass8_0:b__0 () (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.22/Editor/VisualStudioIntegration.cs:100)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

Already tried deleting .csproj and .sln files.
Already tried reinstalling visual studio package from Unity .
Already tried reinstalling Unity tools from Visual Studio.
Already tried deleting .vs hidden folder in Unity project.
Already tried deleting Unity Library folder.
Already tried to check if external tool editor in preferences is visual studio.
Already tried to change API compatibility level from standard to framework.
Already tried unload and reload vs project.
Already tried reimport all in Unity.
Already tried reinstalling Visual Studio.
Already tried installing previous Visual Studio version.
Already tried installing Visual Studio preview.
Already tried updating Unity 5 & 6
Already tried reinstalling Unity and Unity Hub.
Already tried installing previous Unity version.
Already tried with blank project.
Already tried pc reboot.
Already tried disabling firewall.
Already tried disabling Network adapters.
Already tried reseting all Network adapters.
Already tried disabling Windows VM Sandbox.
Already fucking tried installing visual studio and unity in windows sandbox.



did you try regenerating the project files, checking the visual studio package in unity is the latest, etc?

I don’t know what you mean by ect but yeah I did this too.

yes I am this dumb. next time I will google “unity bug etc” first before posting here, thanks.
no this is ironic. I know what it means. and it does not help because what you have in mind is not magically accessible. I already did a full list of etc in the first post.

1 Like

sadly by saying you dont know what “ect” means, how am I to know you were being sarcastic…

Normally when the link fails it doesnt say csharp in the top left hand corner, it says miscellaneous files, so regenerating the project files helps. It could be, that once again VS has broken in part the unity link on their side, but, id expect to have seen a lot more people here going “me too”

1 Like

More context : when I open Visual Studio from Unity everything looks ok and project references are all ok.
BUT just creating a new C# file and saving its modification break all references.
If I reopen visual studio afterward then all is ok again. until saving the next new file.
I updated the title to “visual studio break all references”.

Have you checked if it happens with a non-Unity Visual Studio project?

Sometimes it helps opening the project from the menu in unity. I guess it regenerates the sln or something.

1 Like

I tried with the last visual studio update (17.11.1) : same bug.
I tried with the last unity update (2023.2.20.f1) : same bug.
I tried with a old unity version (2022.3) : same bug.

I have a recurrent error at unity oppening :
Unable to join player connection multicast group (err: 10013).

I don’t use visual studio outside Unity so I don’t how to test without unity.
And since I updated to vs 17.11.1, and the issue started from 17.11.0, I can not go back to 17.10 because the installer let you only go back one step.

You install the relevant required modules (eg .NET Desktop Development) and create a project through Visual Studio.

Unity and VS communicate via networking and that sounds like you have a networking problem of some kind. See if any of the solutions in this thread help.

I don’t know whether to be stoked a thread from 2012 is still accumulating fresh solutions to the same problem, or sad that 100% of everybody I know has had some kind of VS integration problem. :frowning:

I want it to be better. It’s such a pain point for so many.

Stumbled upon this message. Noticed that I was a version behind. Having no problems (of consequence) with Visual Studio since it was released in 1977 I decided to update. And… of course… there is no issue.

Granted it was a bit larger of an update than I seem to remember but despite an extra minute or two it completed. At which I time I opened my project files from Unity and everything was like it was earlier today using the previous version.

A bit of what could be useful advice if you heed it, “things go wrong”. That is part of life and software installs are no exception. If I had an issue with this update I would (likely) have uninstalled VS as best I could and gone through the steps of installing it again. I would be careful to follow any “Unity-specific” instructions (if there were any). In this case nothing special was required.

My main Unity project BTW is a VR world for VRChat which (being gracious) can be finicky.

So something is definitely wrong with your installation. Nobody is disputing that but it is your installation, your computer, your software or something and most likely not VS or Unity.

Not that it couldn’t be some combination of libraries and/or dependencies but I have a lot of them and everything worked great.

My advice is to try again.

1 Like

I’m going to investigate this.

So I tried as many workaround as I was able to do from this 10 years old thread
socket-unable-to-join-multicast-group
and I still have the bug.

however “reimport all” in unity trigger this error :

Unable to use UDP port 56658 for VS/Unity messaging. You should check if another process is already bound to this port or if your firewall settings are compatible.
UnityEngine.Debug:LogWarning (object)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration/<>c:<.cctor>b__6_0 () (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.22/Editor/VisualStudioIntegration.cs:55)
Microsoft.Unity.VisualStudio.Editor.VisualStudioIntegration/<>c__DisplayClass8_0:<RunOnceOnUpdate>b__0 () (at ./Library/PackageCache/com.unity.ide.visualstudio@2.0.22/Editor/VisualStudioIntegration.cs:100)
UnityEditor.EditorApplication:Internal_CallUpdateFunctions ()

I remember having this message without consequence some time ago, tried many thing with no success, then it vanished one day.
edit:
I disabled firewall and tried “reimport all” 3 time, get the warning 2 times, still have the bug.
edit:
I disabled hyper-v/sandbox in windows and reboot, still have the bug.

These tools are not wood stakes one pounds into the ground with whatever is nearby. (Maybe) consider them surgical instruments or expensive electronic gizmos.

We don’t win a prize by defending a tool but I don’t think you issues qualifies as “bugs”. Your setup is wrong. Perhaps it is a firewall issue but isn’t the fault of Unity or VS or Windows or your car. It could be the a problem with the tooling, a plug-in, the order you set things up or your anti-virus, your firewall, etc.

It isn’t fun but the reality is (and I’ve done it hundreds of times) you need to start at the beginning and reinstall the parts.

Final word from me… if any of these things were bugs we should expect to hear at least one other person report “I updated and it no longer works”. Something got hosed, un-hose it :slight_smile:

I went to reinstalling unity, visual studio, disabled the firewall and windows virtual machine, disabled all network adapters, tried updating, tried previous versions, emptied caching…
Maybe it is not from visual studio last update but what can I do now ? I will not reinstall windows.

I wouldn’t reinstall Windows for the type of error you are getting. There is such a thing as overkill.

Search if you haven’t or if you have, then search again for “Unable to use UDP port 56658 for VS/Unity messaging” You are not the first person to have encountered it. Others have posted their fixes. You probably are not using VMWare (I’ll guess) so pay attention to the firewall-related replies. And this could include any software that acts as a firewall and your router too.

I regularly reinstall Windows and by this point in time I would have done so. My last reinstall wasn’t even that long ago. Less than a month when I was troubleshooting hardware failure and reinstalled every time I made a major swap (multiple swaps of my motherboard and GPU). I don’t enjoy the process but with a decent system you’re looking at less than an hour to wipe, install OS, install drivers, and install major apps like VS and Unity.

You most likely won’t have a choice if you want that computer to be usable. Sometimes Windows just has things wrong with it that nothing else can solve. So it’s possible it’s going to be that or choose a different IDE.

1 Like

there is a lot you can do to straighten things out before reinstalling. Im with @anthonov Id rather not unless utter death was likely. Even then, i try hard not to.

Especially for a port issue.