Friday, January 31, 2020

.suo issue in Visual Studio 2017 -- tips in compiling MFC project

tips in compiling MFC project . working on some examples in <Programming MFC ground up > book. first example in the book.

  1. Quick tip: What to do when Visual Studio freaks out and everything is red
  2. Having just installed Xamarin, I first thought that it was the culprit. Or maybe Resharper. Anyway whatever the cause was (and I am still not 100% sure what actually triggered this behavior), recovering from it is actually quite easy:

    1. Close Visual Studio
    2. Delete the SUO file
    3. Restart Visual Studio.

    The SUO file is a hidden file,, which is placed in the same folder as the SLN file. It contains a lot of information such as which files are currently open in the IDE, some local settings, etc. Personally I hate this file because it can cause a lot of trouble if it gets corrupted. And since it is hidden, you don’t always think about it.

    So the rule is: If you see some weird behavior in Visual Studio, try to delete the SUO file first, before you try anything else.

    Update: I was just told that unloading and reloading the project file might help too. I suspect that under the cover this also modifies the SUO file and solves the issue. Good to know :)


    this tip works well: unload project and then reload project.

    Adding to the votes:

    • – Deleting suo did not help
    • – Restarting VS did not help
    • – Unloading and reloading the project solved the issue!

  3. Visual C++ : Please help me with the following code
  4. the answer is: These errors have to do with the fact that your application is using Unicode (wchar_t) strings. The best thing to do is change all your string literals to wide character literals, e.g.

  5. Visual Studio displaying errors even if projects build
  6. My symptoms in VS2019 were that I would build with some errors. Then I'd fix the errors, and the build would work, as shown in the Output window. But the Errors windows still showed the old errors. I could run it just fine. Closing VS2019 and reopneing fixed the issue, but only for a little while. This started happening on version 16.4.3

    This solution seems to work for me:

    Uncheck Tools->Option->Projects and Solutions->General->Allow parallel project initialization

  7. VS 2019 Intellisense reports compile errors when rebuild all does not.
  8. Thank you for report this issues. Do these errors go away if you uncheck Tools > Options > Projects and Solutions > General > Allow parallel project initialization, delete the .vs folder, and reload the solution?

  9. Fixing Visual Studio Intellisense Errors
  10. Clearing up Intellisense There's usually a simple solution when IntelliSense decides to sleep one off:

    Delete the .vs folder

    The .vs folder holds solution related temp data including the .suo file that caches intellisense and some debug data. That folder also holds Web site configuration data for Web projects and a few other things. It's safe to delete this folder - Visual Studio recreates it when it's missing.

    Older versions of Visual Studio (prior to VS 2015) didn't have a separate folder and dumped that same information into files in the solution's root folder.

    In these older versions you can fix Intellisense issues by deleting the Solution's .suo file. Deleting the .vs folder in newer version nukes the .suo file which is responsible for cached IntelliSense and also some cached Debug data. When VS acts up and reports whacky errors that seem wrong, the burning down the .suo file is a nice quick thing to try first.

    To do this:
    1. Shut down VS
    2. Nuke the .vs folder or the .suo file
    3. Restart VS

    The .suo file contains cached IntelliSense data and once that file is off, no amount of recompilation or clearing the project is going to help. Nuke the .suo file. or in VS 2015 or later the .vs folder and get back to sanity.

  11. Quick tip: What to do when Visual Studio freaks out and everything is red

No comments:

Post a Comment