Which "Office" reference to use?

D

DapperDanH

Hello,
In a C# VS.net Solution, I made a reference to Microsoft Project 11.0 Object
Model, which is version MSP2003. The path for this reference shows up as
"C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.MSProject\11.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.MSProject.dll"

Automatically, that added a reference to Microsoft.Office.Core. This
reference path shows up as
"C:\WINDOWS\assembly\GAC\Office\11.0.0.0__71e9bce111e9429c\Office.dll"

I noticed in the .NET tab of the "Add References" dialog, there is "office".
Adding this as a reference shows a path of
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\office.dll".

Which office reference should I use? The one automatically added which
references the GAC or the one that shows up in the .NET reference tab?

Thanks,
Dan
 
M

Mark Bower [MSFT]

To Add Reference in a .NET project to an Office use the COM tab. Yes I know
it seems kinda counter-intuitive, but use the COM tab, select the office
component you are interested in, and provided you have the PIAs installed
VS.NET is smart enough to make sure you have a reference to the right PIAs
rather than the you have to worry about exactly where they are installed.

--
Mark Bower
Microsoft
http://blogs.msdn.com/bowerm

This post is provided 'as-is' without warranty and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top