Microsoft.Office.Core Reference Missing
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.
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.
After that, I was able to see 'office', this assembly contains Microsoft.Office.Core.
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...
Solution 4
If someone not have reference in .NET . COM (tab) or not have office installed on machine where visual was installed can do :
- Download and install: Microsoft Office Developer Tools
-
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!
Related videos on Youtube
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, 2021Comments
-
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 almost 13 yearsTried both suggestions and still seem to be stuck. The question is what is the "COM Library appropriate for your system" in my case?
-
rd42 over 12 yearsDid you ever figure this out? I'm having the same issue.
-
-
Maxim Gershkovich almost 13 yearsTried all three. No luck thus far!
-
samus over 9 years.NET->Office (if PIA installed). See Spike's answer below.
-
oo_dev over 8 yearsInstalled 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 about 8 yearsI have been able to find the other PIAs but not Microsoft.Office.Core
-
DrMarbuse over 7 yearsUpvoted because this actually did it to me. Initially setting the references to .COM did not solve the problem.
-
marsze about 7 yearsI 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 about 7 yearsJazakallah Adil bhai. Worked for me.
-
Edward almost 7 yearsBe nice to know where this .NET tab is
-
Edward almost 7 yearsStill doesn't show up in the COM list to add as reference
-
Thumper almost 7 yearsAdding 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 almost 7 yearsI 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 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 over 6 yearsThank you very much
-
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 over 3 yearsI 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 over 2 yearsThis is not by Microsoft, but by individual developer
-
Yogi over 2 yearsCorrection - NuGet PMC does not install this package as claimed in above comment.
-
Yogi over 2 yearsThe owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.