2

I'm using Visual Studio Community 2019 and coding in C#. If I create a Windows Forms App either on an existing solution or in a new one, it opens IntelliSense, loads the file and then this error message appears:

  *"IntelliSense finished initializing, but an error ocurred when attempting to load the document"*  

  *"Error code: 0x80131500"*

Most of the tutorials I've found point to solutions with Unity, but I'm not working with it. I've tried restarting the export and import settings, running as administrator, starting the Windows Forms app in a separated solution, on a new one, using NET 5.0 and with NET 3.1, unchecking then rechecking the "Auto list members" and "Parameter information" boxes on Tools > Configuration > Text Editor > All Languages > General menu, then rebooting. But nothing has worked. I've read that the .csproj file could be corrupted, but I don't know how to check or repair that.

ouflak
  • 2,458
  • 10
  • 44
  • 49
  • Do you get the same if you make a .NET Framework project instead? – Caius Jard Apr 19 '21 at 19:35
  • Can you try this? Tools > Options > Environment > Preview Features. Make sure load projects faster is enabled. – Jonathan Monestel Apr 19 '21 at 20:10
  • @JonathanMonestel It was enabled, I unchecked and then rechecked, but nothing – Tomás Montaña Apr 24 '21 at 13:06
  • @Caius Jard I think I don't get what you're suggesting, the "Console App (.NET Framework) is the only project I've found with that name, but it isn't a Windows Forms App – Tomás Montaña Apr 24 '21 at 13:25
  • Make a new project, set "C# allplatforms allprojecttypes" and search *forms framework*. Does your new project dialog look like mine: https://i.stack.imgur.com/r12iC.png – Caius Jard Apr 25 '21 at 06:19
  • In that case, I will suggest to re-install VS. Create an entirely new project and see if the error is gone. If so, open your existing project, if it fails, most likely something is corrupted. Rather than spending many hours figuring out how to repair I would just copy the code into a new project. – Jonathan Monestel Apr 26 '21 at 15:15
  • @Caius Jard No, I have "ASP.NET Web Application (.NET Framework)", "Web Driver Test for Edge (.NET Framework)" and "Console App (.NET Framework)" in that order. Searching it, I have the "Windows Forms App" but no the "Windows Forms App (.NET Framework)" – Tomás Montaña Jun 06 '21 at 19:49
  • @Jonathan Monestel I have Re- Installed it, but it didn't worked – Tomás Montaña Jun 06 '21 at 19:57
  • Try this tools>import and export settings>reset all settings>general. Reset VS and try again. If that does not work then I am out of options. – Jonathan Monestel Jun 08 '21 at 00:14
  • @JonathanMonestel Thank you! I think that I've tried that before, but thank you so much! Solved – Tomás Montaña Jun 09 '21 at 01:35

2 Answers2

1

Referring to \[Microsoft Community\]\[1\] and my own experience, this solution works perfectly:

Uncheck this Item from Tools -> Options -> Environment -> Preview Features -> Uncheck "Load projects faster"

enter image description here

That's all!

ouflak
  • 2,458
  • 10
  • 44
  • 49
1

Tools -> Import and Export settings -> Reset all settings -> General. Reset Visual Studio and try again. - Answered by Jonathan Monestel

ouflak
  • 2,458
  • 10
  • 44
  • 49