Search code examples
visual-studioms-office

VB.NET Missing Reference (Microsoft.Office.Interop) after MS Office Recovery


Just before I got a problem with excel and I recovered MS Office with online option. After that my excel works well, but my project in Visual Basic VB.NET lost excel reference(Microsoft.Office.Interop). I recovered already Visual Studio, but it still loses reference. I use Office Home & Student 2019 and Visual Studio 2019. Please, help me to fix it. enter image description here


Solution

  • Have you tried simply adding the Microsoft.Office.Interop.Excel extension library?

    enter image description here

    Further to your comments, if that reference isn't available/visible, check this SO question: Microsoft.Office.Interop.Excel Reference Cannot be found.

    Personally, out of the answers there, I'd try the NuGet option first:

    enter image description here