A
A
Andrey Pavlov2022-03-09 12:27:06
visual studio
Andrey Pavlov, 2022-03-09 12:27:06

Updated VS to 2022, now both 2019 and 2022 don't work, how do I fix this issue?

I updated VS to 2022, now both 2019 and 2022 do not work, tried to reinstall it did not help. I open the console application with Hello World! and I get an error. I just started learning C++ and I already have problems ((. I also searched on the Internet, I didn’t find an answer, please help.

Error:

>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.31.31103\include\yvals.h(12,10): fatal error C1083: Cannot open include file: crtdbg.h: No such file or directory


The code itself
#include <iostream>

int main()
{
    std::cout << "Hello World!\n";
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Andrey Pavlov, 2022-03-14
@androdiplus

Solution:
I installed the SDK and the problem was solved by itself.
The system apparently did not have the necessary libraries.

R
rPman, 2022-03-09
@rPman

see if there is a file along this path and, for example, on which folder in this path is a bummer (almost certainly 14.31.31103 is called differently)
, you can of course pick the registry manually and find why the paths there are incorrect, but this will require a lot of effort.
I don’t know why this happened to you, but reinstalling or repairing (the repair button in the installer) should solve such problems
advice, if repair does not work (more precisely, it works, but the problem remains) delete the entire studio, after going through the installation, uninstall programs and delete everything there that one way or another it swings (rather there will be leftovers from sql and possibly patches), just look at the installation date, all components should be approximately the same date
before that, according to the mind, you would need to save the configuration, there is such an option in the installer, you can import it later, but I have doubts about this
https://docs.microsoft.com/ru-ru/visualstudio/inst...
then delete it in the registry branches related to the studio (I hope you don't have other versions) HKCU\Software\Microsoft\VisualStudio and HKLM\Software\Microsoft\VisualStudio then you can manually delete the remaining studio files in program files and, wisely, you need to go through the missing components and unregister them too some kind of cleaner (I use Microsoft's sysinternails autoruns, it shows which entries in the registry refer to nowhere)
I still need to clear a bunch of files in the appdata of the user profile (there will be nuget caches for example)
here googledMicrosoft's utility to remove the remnants of the studio
and after that, reboot, making sure that all the remnants of the studio are removed, restart the installation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question