3

This was working last night. I've loaded up Unity today, made zero changes that could cause something like this to happen and it's just stopped working for no reason.

"Attach to Unity" doesn't work, "Attach to Unity and Play" doesn't work.

How do I fix this? There's no information on Google and zero helpful information in the error message.

enter image description here

enter image description here

enter image description here

user9754798
  • 363
  • 3
  • 15
  • Does this answer your question? [Visual Studio loses ability to attach to Unity, why?](https://stackoverflow.com/questions/55337121/visual-studio-loses-ability-to-attach-to-unity-why) – Fernando D'Andrea Feb 01 '21 at 02:31

1 Answers1

2

I had this problem and no closing, restarting VS or Unity would help. Then I found this post: https://developercommunity.visualstudio.com/t/the-operation-could-not-be-completed-unspecified-e-4/1654024 It mentions network interfaces for virtualization systems. I had a HyperV machine running in the background so I shut it down and restarted VS. The debugger connected immediately.

Miroslav Zadravec
  • 3,510
  • 5
  • 24
  • 35
  • I have recurrent issues with debugging Unity 2021 from VS. This "Operation could not be completed" appeared recently and stopping HyperV services apparently fixed it after VS was restarted. – khelkun May 25 '23 at 11:59