Visual Studio Opens Every Time I Create/Delete a Script

Whenever I have an instance of Visual Studio open and I create or delete a script, Visual Studio always has to pop open. It doesn’t even open the new script I create (if I created one), it just pops up with whatever script I had open at the time.

This is super annoying because I sometimes accidentally create a new C# script when I meant to make a new folder. Only way I’ve found to get around this is to completely close Visual Studio while I organize files in Unity.

How can I get VS to stop opening automatically? I’m using VS 2019 Community.

I have no idea what did it but I went under Build and clicked every option for building/rebuilding the solution and Assembly-CSharp and it stopped.

Edit:

OK that only worked for like a minute or 2, I found how to actually stop this behavior but it introduces even more problems, in Visual Studio: Tools > Options > Tools for Unity > General > Automatic project reloading, set this to false BUT now autofill is broken and VS doesn’t recognize any classes or default methods… so I guess VS + Unity is just broken for some people, awesome :]

Is there a why to fix this? So frustrating creating a script in Unity and having Visual Studio refresh. It would be mildly ok if VS actually opened the new script, but it doesn’t.

This is an old post but it is still an issue and the answers here break Visual Studio. To stop this from happening opening up VS go to tools and then click documents and uncheck Detect File Change.

Edit: That worked for a while but now it is doing it again, so /shrug

Hi @Aeridis. It’s been a while since you asked the question. Did you manage to find a solution for this? I would like to get rid of this behaviour too.

Updating the following packages inside the Package Manager worked for me:

  • Visual Studio Code Editor Visual

  • Visual Studio Editor