Groups | Blog | Home
all groups > visual studio .net general > november 2006 >

visual studio .net general : no COM references listed in Add Reference Dialog


Derick Beckwith
11/26/2006 6:49:28 PM
I have searched MSDN and the web for answers to this problem but no luck. I
have VS.Net 2003. I want to add a COM reference to my C# project so that I
can automate Excel from my app. But the COM tab of the Add Reference Dialog
is completely empty, no objects listed, no vertical scroll bar. The .NET
tab does have quite a few objects listed. I can manually add a reference
directly to the Excel.exe file by clicking browse but does anyone know why
the list would be completely empty? The thing about using the manual method
is that intellisense is of no help. (no Excel or Office namespace) I am
using Office 2003 SP2.

Thanks,
Derick



Gerry Hickman
11/27/2006 11:28:57 PM
Hi,

I've just tested this in VS2005, created new solution, added C# project,
wrote code to Form1.cs, right-click project folder, choose "Add
Reference", .NET tab and COM tab both have more entries than anyone
would ever know what to do with.

Your machine config might be messed up; try on difference computer; try
running DcomCnfg (or what ever it's called) and see if you have COM
listed, run OLEVIEW and see if it runs normally.

Other notes, don't mix and match managed code and COM. Use JScript to
call COM direct or use unmanaged code, C# is not the right tool for
this. Dependency tree abounds - bad.

[quoted text, click to view]


--
AddThis Social Bookmark Button