.NET 7.0 Add COM component to Project?

  • Thread starter Thread starter Patty Lorge
  • Start date Start date
P

Patty Lorge

Hello,
I checked the Help and it says you Add/Remove COM
components and Type Libraries to Projects by selecting the
menu item Project-->Add References. However my Project
does not have the Add References Menu item.

Any information will be appreciated.
Patty
 
Hi Patty

What version and edition of VS are you using? Open the Solution Explorer (View->Solution Explorer in the main menu) and make sure that your project node
is selected before opening the Project menu.

Another way to add COM references is to right click on the project node in the solution explorer and select "Add Reference...". Once the dialog shows, make
sure that you click on the COM tab.

Thanks
Gabriel

--------------------
 
Hi Gabriel,
I am using
MDE 2002 Version 7.0.9466
..NET Framework 1.0
This is a Visual C++ program that I upgraded from VS 6.0
where it had no problem adding a COM Reference.

When I click the Project Menu or right click on the
Project from the Solution Explorer, my menu selection does
not include Add Reference. My choices are:

Add Class...
Add Resource..
Add New Item...
Add Existing Item...
New Folder
Unload Project
Add Web Reference...
Set as StartUp Project
Properties

That's the entire list.
Thanks for the help,
Patty



-----Original Message-----
Hi Patty

What version and edition of VS are you using? Open the
Solution Explorer (View->Solution Explorer in the main
menu) and make sure that your project node
is selected before opening the Project menu.

Another way to add COM references is to right click on
the project node in the solution explorer and select "Add
Reference...". Once the dialog shows, make
sure that you click on the COM tab.

Thanks
Gabriel
confers no rights. Use of included script samples are
subject to the terms specified at
 
Hi

Ok, C++ does not allow you to add references in this way in VS 2002 (only C# and VB).

For C++ it depends on what you want to do. If you want to use a COM component in a dll, you can use the #import directive or #include the header and add the
lib file to the linker (Project Properties\Linker\Input\Additional dependencies.

It should work very similar to how you did it in VS6.0. How were you doing it in 6.0?

Thx
Gabriel Esparza-Romero, Visual C# Team
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
 
Gabriel,
Thanks, I found the Knowledge Base item that explains
this. The 6.0 source used regsvr32 to register the .dll
and #import in the source. I hope that's all there is to
it. I somehow thought that there was also Add Reference
but that must have been the VB client version.
Thanks again.
Patty


-----Original Message-----
Hi

Ok, C++ does not allow you to add references in this way in VS 2002 (only C# and VB).

For C++ it depends on what you want to do. If you want to
use a COM component in a dll, you can use the #import
directive or #include the header and add the
lib file to the linker (Project
Properties\Linker\Input\Additional dependencies.
It should work very similar to how you did it in VS6.0. How were you doing it in 6.0?

Thx
Gabriel Esparza-Romero, Visual C# Team
This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
 
Back
Top