Solved

How to change type of reference from NET to COM

Posted on 2012-03-20
3
464 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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