471,605 Members | 1,700 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,605 software developers and data experts.

Distribute C# DLL

Using C# Express 2005, I have successfully created a DLL to work with non
..NET clients. On the machine that I have created this DLL, it works fine and
exposes its properties, methods and events and the events fire when expected
(except with Excel 2003 where I cannot create an instance). I want to install
it on another PC with .NET Framework 2.0 installed (no C# Express). I have
tried REGASM, the DLL becomes visible BUT I cannot create an instance of it.

In Express 2005, what is Project | Build and Project | Rebuild acomplishing?
This is what I need to replicate. Or, someone knows better?

In simple terms (i.e C# Express 2005 context), please, what do I need to do
with the DLL for it to work on PCs other than the one it was created on , and
where it works?

Thank you for your help.
Jan 15 '06 #1
2 1391
When you say "to work with non-.Net clients", must assume you mean .NET is
not installed on the client. And that means you want to write Com-Callable
wrapper typelibrary so your .NET assembly can be registered for COM?

Typically the Assembly needs to be installed in the GAC, and the typelibrary
registered for COM. A Setup / Deployment project gives you the tools to do
this, if that's what your intentions are.

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ajay_Askoolum" wrote:
Using C# Express 2005, I have successfully created a DLL to work with non
.NET clients. On the machine that I have created this DLL, it works fine and
exposes its properties, methods and events and the events fire when expected
(except with Excel 2003 where I cannot create an instance). I want to install
it on another PC with .NET Framework 2.0 installed (no C# Express). I have
tried REGASM, the DLL becomes visible BUT I cannot create an instance of it.

In Express 2005, what is Project | Build and Project | Rebuild acomplishing?
This is what I need to replicate. Or, someone knows better?

In simple terms (i.e C# Express 2005 context), please, what do I need to do
with the DLL for it to work on PCs other than the one it was created on , and
where it works?

Thank you for your help.

Jan 16 '06 #2
Thanks for the response, Peter.
By non .NET client I mean a PC that DOES have .NET Framework 2.0 installed
but using client software that does not understand .NET. I happen to be using
APL but it could easily have been Excel or VBScript etc. With APL, on the Pc
originating/constructing the DLL, all works fine but not with Excel (using
its VBA).
The C# Express 2005 does not mention anything about GAC and the SN is off.
I know how to put the DLL in the GAC. What do I do:

1. put the DLL in the GAC on the originating PC? When? Before or after I
rebuild?
2. Then, what do I do on the target PC? Use REGASM? The put the DLL in the
GAC?

Would the Deploymnent Wizard in VS 2005 take care of everything so far as
the target PC is concerned?

Thank you for your valued assistance.

"Peter Bromberg [C# MVP]" wrote:
When you say "to work with non-.Net clients", must assume you mean .NET is
not installed on the client. And that means you want to write Com-Callable
wrapper typelibrary so your .NET assembly can be registered for COM?

Typically the Assembly needs to be installed in the GAC, and the typelibrary
registered for COM. A Setup / Deployment project gives you the tools to do
this, if that's what your intentions are.

Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ajay_Askoolum" wrote:
Using C# Express 2005, I have successfully created a DLL to work with non
.NET clients. On the machine that I have created this DLL, it works fine and
exposes its properties, methods and events and the events fire when expected
(except with Excel 2003 where I cannot create an instance). I want to install
it on another PC with .NET Framework 2.0 installed (no C# Express). I have
tried REGASM, the DLL becomes visible BUT I cannot create an instance of it.

In Express 2005, what is Project | Build and Project | Rebuild acomplishing?
This is what I need to replicate. Or, someone knows better?

In simple terms (i.e C# Express 2005 context), please, what do I need to do
with the DLL for it to work on PCs other than the one it was created on , and
where it works?

Thank you for your help.

Jan 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Daniel Lidström | last post: by
4 posts views Thread by Ed Landau | last post: by
1 post views Thread by Rufus DeDufus | last post: by
3 posts views Thread by Nick | last post: by
2 posts views Thread by Laszlo Szijarto | last post: by
4 posts views Thread by mike7411 | last post: by
11 posts views Thread by jackbenimble999 | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.