6

I can change the build configuration from debug to release (or other debug configurations that I created), but when I change back to debug, Visual Studio freezes. Memory usage keeps climbing and climbing, until Visual Studio restarts by itself after an hour or so.

I'm sure that's going to get fixed at some point. As a temporary work-around, I was hoping to change which configuration is selected on startup by changing .suo file. However, that appears to be a binary file, and I see no easy way to edit it. Other than deleting the .suo file, is there another way to either select which configuration is selected on startup? Or suggestions to avoid the hanging? I have tried lightweight solution loading, and it made no difference.

I deleted the .suo file, and, as expected, a new one was recreated. The new .suo is 6kb big. The old .suo file is 13MB big.

Jimmy
  • 5,131
  • 9
  • 55
  • 81

2 Answers2

11

After deleting the big .suo file I was able to switch back and forth between build configurations. The .suo file is hidden in

C:\dev\[solution name]\.vs\[solution name]\v15\.suo 

(that's right, there is no filename, just a .suo extension)

Jimmy
  • 5,131
  • 9
  • 55
  • 81
  • 1
    wow i used to go make a coffee evrey time i swished build configuration, what a difference! – CMS Jan 11 '19 at 08:16
1

This is an old question but I found one solution that folks can use. All we need to do is:

  • open .sln file with a text editor
  • search for debug or release
  • under GlobalSection(SolutionConfigurationPlatforms) = preSolution, cut the build that you don't want. For eg. To remove debug, cut Debug|x86 = Debug|x86
  • save it
  • open the solution, you can see the build version has been changed to Release. Now close the solution and paste that line we cut, save it. If we open the solution again, we see that VS has retained the Release in build configuration.
Jared Forth
  • 1,577
  • 6
  • 17
  • 32