0

Recently I had to reinstall VS2019, but I am unable to create any kinds of C++ projects. Selecting a template and clicking on Create gives an "Object reference not set to an instance of object" error. It creates the folder and .vs subfolder but no .sln file. I tried reinstalling the IDE, reinstalling it to the default location, clearing everything VS related and reinstalling it again, but I get the same error. This problem only occurs with C++ projects as I can create and build C# projects.

val
  • 729
  • 6
  • 19
  • 1
    Remove all C++ options and install and restart again adding desired C++ options. If it fails, reformat your hard drive and reinstall everything. – Phil1970 Jan 15 '20 at 01:25
  • Do you have C++ required toolset and packages installed as like of .Net? I mean check whether you have the "Desktop development with C++" is installed. – Build Succeeded Jan 15 '20 at 05:41
  • I suggest you could try to delete folder ComponentModelCache on path C:\Users\{user}\AppData\Local\Microsoft\VisualStudio\.For more details I suggest you could refer to the link: https://stackoverflow.com/questions/34084003/visual-studio-2015-error-object-reference-not-set-to-an-instance-of-an-object#comment58856322_34085345 – Jeaninez - MSFT Jan 15 '20 at 06:00
  • I tried all the above approaches before posting this question, the only thing I did not do is to format the hard drive. But the nuclear option worked and now I can create and use C++ projects. Thanks for the comments. – val Jan 15 '20 at 17:00

0 Answers0