C# equivalent of COM dll

  • Thread starter Thread starter Mullin Yu
  • Start date Start date
M

Mullin Yu

I want to know what's the equivalent of COM dll at .NET platform?

I want to build a .NET component and will be reused by other .NET
application. [-> Add Reference -> .NET]

Any links/sample code to teach this?

Thanks!
 
A class library (an assembly containing pre-developed classes but cannot be
executed). Any public type contained in such an assembly can be re-used by
any other .NET assembly the way you have mentioned [-> Add Reference ->
..NET]

To create a class library project in VS .NET, just choose the appropriate
project type in the New Project dialog. You do not have to write any
"plumbing" code, nor it is added by any wizard/the compiler behind the
scenes.

P.S. Generally speaking, the only things that differentiate an executable
assembly from a class library one are that the executables have the ".exe"
suffix and an entry point AKA public static void Main().
 
how to register like vb dll like regsvr32

i got the dll and pdb file?

thanks!


Dmitriy Lapshin said:
A class library (an assembly containing pre-developed classes but cannot be
executed). Any public type contained in such an assembly can be re-used by
any other .NET assembly the way you have mentioned [-> Add Reference ->
.NET]

To create a class library project in VS .NET, just choose the appropriate
project type in the New Project dialog. You do not have to write any
"plumbing" code, nor it is added by any wizard/the compiler behind the
scenes.

P.S. Generally speaking, the only things that differentiate an executable
assembly from a class library one are that the executables have the ".exe"
suffix and an entry point AKA public static void Main().

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Mullin Yu said:
I want to know what's the equivalent of COM dll at .NET platform?

I want to build a .NET component and will be reused by other .NET
application. [-> Add Reference -> .NET]

Any links/sample code to teach this?

Thanks!
 
Hi,

You don't need to, there is two ways of using it:
1- Copy the dll along with the program that will use it, .net framework will
look into the directory from where the application runs for the dll
2- Copy the DLL to the GAC, this is a more complex deployment as you need to
strong sign the DLL, take a look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncfhowto/html/HOWTOGAC.asp


Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Mullin Yu said:
how to register like vb dll like regsvr32

i got the dll and pdb file?

thanks!


Dmitriy Lapshin said:
A class library (an assembly containing pre-developed classes but cannot be
executed). Any public type contained in such an assembly can be re-used by
any other .NET assembly the way you have mentioned [-> Add Reference ->
.NET]

To create a class library project in VS .NET, just choose the appropriate
project type in the New Project dialog. You do not have to write any
"plumbing" code, nor it is added by any wizard/the compiler behind the
scenes.

P.S. Generally speaking, the only things that differentiate an executable
assembly from a class library one are that the executables have the ".exe"
suffix and an entry point AKA public static void Main().

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Mullin Yu said:
I want to know what's the equivalent of COM dll at .NET platform?

I want to build a .NET component and will be reused by other .NET
application. [-> Add Reference -> .NET]

Any links/sample code to teach this?

Thanks!
 
but, i want to make it like a COM, and then pass to others to use it?

method 1 seems not working

method 2, i went to the link, the sample shows the content on the gac files
like
\Program Files\MyApp\Engine.dll
\Program Files\MyApp\Support.dll

but, do i need to specify the driver lik
c:\Program Files\MyApp\Engine.dll or
d:\\Program Files\MyApp\Engine.dll

also, is it what i want? I just want to create a .NET component and then
pass to other developers to use it like the old VB COM.

thanks!


Ignacio Machin ( .NET/ C# MVP ) said:
Hi,

You don't need to, there is two ways of using it:
1- Copy the dll along with the program that will use it, .net framework will
look into the directory from where the application runs for the dll
2- Copy the DLL to the GAC, this is a more complex deployment as you need to
strong sign the DLL, take a look at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncfhowto/html/HOWTOGAC.asp


Hope this help,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Mullin Yu said:
how to register like vb dll like regsvr32

i got the dll and pdb file?

thanks!


in message news:[email protected]... cannot
be
re-used
by
any other .NET assembly the way you have mentioned [-> Add Reference ->
.NET]

To create a class library project in VS .NET, just choose the appropriate
project type in the New Project dialog. You do not have to write any
"plumbing" code, nor it is added by any wizard/the compiler behind the
scenes.

P.S. Generally speaking, the only things that differentiate an executable
assembly from a class library one are that the executables have the ".exe"
suffix and an entry point AKA public static void Main().

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

I want to know what's the equivalent of COM dll at .NET platform?

I want to build a .NET component and will be reused by other .NET
application. [-> Add Reference -> .NET]

Any links/sample code to teach this?

Thanks!
 
Back
Top