Solved

How to change type of reference from NET to COM

Posted on 2012-03-20
3
463 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
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 …
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…

789 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