Solved

How to change type of reference from NET to COM

Posted on 2012-03-20
3
459 Views
Last Modified: 2012-08-13
Hi X-perts,

I have a reference in my old project to DLL, which is supposed to be referenced as COM type. It works fine, but I cannot delete - update it in my new migrated project, because by default it always assigns NET type when I point to that file.

I cannot remember how I managed to register it as COM (it was two years ago).

Question: how to switch the reference type from NET to COM for external refeence libraries?

Thanks
0
Comment
Question by:orgrau9
3 Comments
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37745711
Remove the reference, Add Reference, In COM Tab select your new component and you are good to go...
0
 

Author Comment

by:orgrau9
ID: 37745722
It is not listed in the COM section. I only can add it by browsing to the file. But in that case it is registered as NET type.
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37765325
If you open the project file in notepad, a normal reference looks like

    <Reference Include="Interop.CSEXWBDLMANLib, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">

and a COM reference looks like

<COMReference Include="AcrobatAccessLib">
      <Guid>{C523F390-9C83-11D3-9094-00104BD0D535}</Guid>
      <VersionMajor>3</VersionMajor>
      <VersionMinor>0</VersionMinor>
      <Lcid>0</Lcid>
      <WrapperTool>tlbimp</WrapperTool>
      <Isolated>False</Isolated>
      <EmbedInteropTypes>True</EmbedInteropTypes>
    </COMReference>


Would you be able to make that change manually?

If you register the assembly using regsvr32, it would appear on COM tab.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question