COM dll in C# ?

R

roben

HI,

Is it possible to create a normal COM/DLL file in C# that can be access
through "normal" ASP.
Like.. ?

<%
Set Myobj = CreateObject("Myobj.Class")
%>

I tried to create a class library in c# and set the "Register for COM
Interop" = true
But when I try do do a regsvr32 xxx.dll it gives an error.

What am I missing???
 
M

Mohamoss

hi
did you register the output assembly using regasm.exe?…
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 
J

jamie

roben said:
No, I didn't.

How should this be done ?
Please explain the procedure...

1. Click Project/<project_name> Properties...
2. Click Configuration Properties
3. Build->Register for COM Interop = True (false by default)

Jamie
 
W

Willy Denoyette [MVP]

Please read the MSDN doc's. Search for "COM Interop Tutorials"
Willy.
 
R

roben

this is not enough..

If you read my initial post, I already did this...

This problem is about registrering..
 
J

jamie

roben said:
this is not enough..

If you read my initial post, I already did this...

This problem is about registrering..


I think that your problem is that the assembly is reversioning itself
each time you build it.

To solve this change this line:
[assembly: AssemblyVersion("1.0.*")]

to
[assembly: AssemblyVersion("1.0.0")]

That way you will not loose the COM interop regitration.

Hope this helps.

Jamie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top