Microsoft.Office.Core Reference Missing

184,419

Solution 1

You can add reference of Microsoft.Office.Core from COM components tab in the add reference window by adding reference of Microsoft Office 12.0 Object Library. The screen shot will shows what component you need.

enter image description here

Solution 2

None of the above answer helped me, i was using Visual Studio 2017. What I did is, installed Office/SharePoint Development using Visual Studio Installer.

enter image description here

After that, I was able to see 'office', this assembly contains Microsoft.Office.Core.

enter image description here

Hope this helps you.

Solution 3

You need to download and install the PIA (primary interop assemblies) for the version of Office you are using. Once installed you can then add a reference to your project and they will be available from the add reference dialog. Here are the links to download them...

Office 2010 PIA

Office 2007 PIA

Office 2003 PIA

Solution 4

If someone not have reference in .NET . COM (tab) or not have office installed on machine where visual was installed can do :

  1. Download and install: Microsoft Office Developer Tools
  2. Add references from:

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Visual Studio Tools for Office\PIA\Office15
    

Solution 5

Now there is a nuget package for that.

https://www.nuget.org/packages/NetOffice.Core.Net40/

First I didn't find office in COM, so tried this nuget and it worked!

Share:
184,419

Related videos on Youtube

Maxim Gershkovich
Author by

Maxim Gershkovich

Developer with experience in. ASP.NET Azure Point of sale software C# VB.NET .NET Framework Sharepoint MVC Microsoft Kinect for Windows 1.8 & 2

Updated on March 01, 2021

Comments

  • Maxim Gershkovich
    Maxim Gershkovich about 3 years

    Using the example provided in codeproject I am struggling to work out where I can find the reference to the library Microsoft.Office.Core.

    I am getting the error "The referenced component 'Microsoft.Office.Core' could not be found."

    I only have office 2007 enterprise edition and outlook 2003 installed on this system. Could this be the cause of this? Otherwise which specific dll am I supposed to be referencing?

    • Maxim Gershkovich
      Maxim Gershkovich almost 13 years
      Tried both suggestions and still seem to be stuck. The question is what is the "COM Library appropriate for your system" in my case?
    • rd42
      rd42 over 12 years
      Did you ever figure this out? I'm having the same issue.
  • Maxim Gershkovich
    Maxim Gershkovich almost 13 years
    Tried all three. No luck thus far!
  • samus
    samus over 9 years
    .NET->Office (if PIA installed). See Spike's answer below.
  • oo_dev
    oo_dev over 8 years
    Installed PIA but couldn't find them in "Add reference", but then it worked for me by adding the DLL from path directly e.g. C:\Windows\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\‌​xxxx\....
  • JohnD
    JohnD about 8 years
    I have been able to find the other PIAs but not Microsoft.Office.Core
  • DrMarbuse
    DrMarbuse over 7 years
    Upvoted because this actually did it to me. Initially setting the references to .COM did not solve the problem.
  • marsze
    marsze about 7 years
    I used "Microsoft Office 14.0 Object Library" (12.0 didn't exist) and it worked as well. Also, I had to delete the reference to "Microsoft.Office.Core" first.
  • shaikhspear
    shaikhspear about 7 years
    Jazakallah Adil bhai. Worked for me.
  • Edward
    Edward almost 7 years
    Be nice to know where this .NET tab is
  • Edward
    Edward almost 7 years
    Still doesn't show up in the COM list to add as reference
  • Thumper
    Thumper almost 7 years
    Adding to answer: If you install an Office Interop lib through the NuGet package manager console (say PowerPoint or Excel), it looks to install this, too... the same does not seem to be true if you use the Visual Studio NuGet GUI
  • Casper
    Casper almost 7 years
    I am using Visual Studio 2017 but I cannot see the the "Microsoft Office XX.X Object Library" in the COM tab. Do I need to install "Microsoft Office"?
  • Luis Palacios
    Luis Palacios over 6 years
    @Kin Did you find out what to do? I'm also using VS 2017 and I don't see a reference to the office's libraries. Did you have to install Microsoft Office?
  • destinydz
    destinydz over 6 years
    Thank you very much
  • Synctrex
    Synctrex over 5 years
    @Kin Once you add the reference from the COM tab, reference it in the class file with using Outlook = Microsoft.Office.Interop.Outlook;
  • Ozair Kafray
    Ozair Kafray over 3 years
    I used "Microsoft Office 16.0 Object Library" (12.0 didn't exist) and it worked as well. Also, I deleted the reference to "Microsoft.Office.Core" first. This is when I have Office App (Office 365) installed version 18.2008.12711.0 and also Visual Studio 2019 installed along with Visual Studio 2005
  • Chandraprakash
    Chandraprakash over 2 years
    This is not by Microsoft, but by individual developer
  • Yogi
    Yogi over 2 years
    Correction - NuGet PMC does not install this package as claimed in above comment.
  • Yogi
    Yogi over 2 years
    The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.