Microsoft.Office.Core 참조 누락
codeproject에 제공된 예제를 사용하여 Microsoft.Office.Core 라이브러리에 대한 참조를 찾을 수있는 위치를 찾는 데 어려움을 겪고 있습니다.
"참조 된 구성 요소 'Microsoft.Office.Core'를 찾을 수 없습니다."라는 오류 메시지가 나타납니다.
이 시스템에는 Office 2007 Enterprise Edition과 Outlook 2003 만 설치되어 있습니다. 이것이 원인일까요? 그렇지 않으면 어떤 특정 dll을 참조해야합니까?
참조를 추가하여 참조 추가 창 Microsoft.Office.Core
에서 COM 구성 요소 탭에서 참조를 추가 할 수 있습니다 Microsoft Office 12.0 Object Library
. 스크린 샷은 필요한 구성 요소를 보여줍니다.
사용중인 Office 버전에 대한 PIA (기본 interop 어셈블리)를 다운로드하여 설치해야합니다. 일단 설치되면 프로젝트에 대한 참조를 추가 할 수 있으며 참조 추가 대화 상자에서 사용할 수 있습니다. 다운로드 링크는 다음과 같습니다.
위의 답변 중 어느 것도 도움이되지 않았습니다. 저는 Visual Studio 2017을 사용하고있었습니다. 제가 한 것은 Visual Studio Installer를 사용하여 Office / SharePoint Development를 설치 한 것입니다.
그 후 '사무실'을 볼 수 있었는데,이 어셈블리에는 Microsoft.Office.Core가 포함되어 있습니다.
도움이 되었기를 바랍니다.
누군가가 .NET. COM (탭) 또는 Visual이 설치된 컴퓨터에 Office가 설치되어 있지 않으면 다음을 수행 할 수 있습니다.
- 다운로드 및 설치 : Microsoft Office 개발자 도구
다음에서 참조 추가 :
C:\Program Files (x86)\Microsoft Visual Studio 11.0\Visual Studio Tools for Office\PIA\Office15
After installing the Office PIA (primary interop assemblies), add a reference to your project -> its on the .NET tab - component name "Office"
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!
Have you actually gone to your references and added a .NET reference to the 'Microsoft.Office.Core' library? If you downloaded the example application, the answer would be yes. If that is the case, follow the advice in the article:
If your system does not have Microsoft Office Outlook 2003 you may have to change the References used by the "OutlookConnector" project. That is to say, if you received a build error described as "The type of namespace name 'Outlook' could not be found", you probably don't have Office 2003. Simply expand the project references, remove the afflicted items, and add the COM Library appropriate for your system. If someone has a dynamic way to handle this, I'd be curious to see you've done.
That should solve your problem. If not, let us know.
In case you are using Visual Studio 2012, for this to work and in order to make reference to Microsoft Office Core, you have to make the reference through Visual Studio by clicking on the top menu's Project, Add Reference, Extensions button and checking office which is now (14.0).
If you are not able to find PIA for Office 2013 then follow these steps:
- Click on Solution Explorer in Visual Studio
- Right click on your project name (not solution name)
- Select 'Manage Nuget packages'
- Click on Browse and search for PIA 2013, choose the shown PIA and click on Install.....
And you are done.
I faced the same problem when i tried to open my old c# project into visual studio 2017 version. This problem arises typically when you try to open a project that you made with previous version of VS and open it with latest version. what i did is,i opened my project and delete the reference from my project,then added Microsoft outlook 12.0 object library and Microsoft office 12.0 object libraryMicrosoft outlook 12.0 object library
Open the properties of the solution and click publish. Then, reclick application files. Change prerequisite to include.
I have the same trouble. I went to Add references, COM tab, an select Microsoft Office 15.0 Objetct Library. Ok, and my problem ends.
part of my code is:
EXCEL.Range rango;
rango = (EXCEL.Range)HojadetrabajoExcel.get_Range("AE13", "AK23");
rango.Select();
// EXCEL.Pictures Lafoto = (EXCEL.Pictures).HojadetrabajoExcel.Pictures(System.Reflection.Missing.Value);
EXCEL.Pictures Lafoto = HojadetrabajoExcel.Pictures(System.Reflection.Missing.Value);
HojadetrabajoExcel.Shapes.AddPicture(@"D:\GENETICA HUMANA\Reportes\imagenes\" + Variables.nombreimagen,
Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoCTrue,
float.Parse(rango.Left.ToString()),float.Parse(rango.Top.ToString()), float.Parse(rango.Width.ToString()),
float.Parse(rango.Height.ToString()));
참고URL : https://stackoverflow.com/questions/5932794/microsoft-office-core-reference-missing
'development' 카테고리의 다른 글
C ++의 메서드에 선택적 인수를 전달하는 방법은 무엇입니까? (0) | 2020.09.13 |
---|---|
clr.dll의 버전이 mscordacwks.dll이 만들어진 버전과 일치하지 않습니다. (0) | 2020.09.13 |
wtf는 WTF입니까? (0) | 2020.09.12 |
Mac과 Linux에서 터미널을 사용하는 것의 차이점은 무엇입니까? (0) | 2020.09.12 |
Intel x86 Atom과 Atom_64 시스템 이미지의 차이점은 무엇입니까? (0) | 2020.09.12 |