18.8.08

Workaround - Visual Studio 6: Hang when trying to load a .cpp file

Ran into a brief problem today when working in VS6. I have a plugin set up to allow switching between .h and .cpp files. Today when I switched to a .cpp file, Visual Studio hung. Not sure if something else was amiss, I verified that I could load this file into another text editor (no file corruption). However, when I tried to directly load the .cpp file in VS, I received the same result.

Luckily, I am privy to the wisdom of co-author, TSE, with regards to vs6:

If all else fails, delete all non-essential project files: .plg, .ncb, .opt, etc. These pretty much are all autogenerated, and so worst case scenario is that stuff loads a bit slower. Best (and most often) case is that your mysterous VS6 bug will disappear along with the corrupted .dsw/.dsp support file.

In my case, it was the .opt that was hosed. It appears that Visual Studio was getting confused about which files remained open in the last session. (I kept getting a "Not all of the windows in the workspace could be opened." error). This information (or some other related information) must be stored in the .opt.

Suffice it to say that I'm back up and running. Thanks, TSE.

0 comments:

Post a Comment