[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Problem registering assembly for using it as ActiveX

Elvian

7/18/2007 9:25:00 AM

Hello,

I've got a little problem. I used to develop a component with Visual
Studio .NET 2003 (.NET framework 1.1), and registering this assembly
to COM interop with a function only writing keys in the registry
(regedit).

This way, I was able to include my activeX component in a former
Visual Studio 6 c++ project (~10 000 files).

The problem is when I switched to Visual Studio C# Orcas express
Editionm and using the .NET framework 3.0

The COM registration doesn't work anymore, and I'm trying to use
regasm to register the assembly, but it doesn't seems to be working,
because I'm not allowed to register the assembly in the GAC, nor to
provide a strong name for it.

Does anyone knows if there is a way, just like the wat I was doing
things before, i.e. writing directly keys in the registry, or at
least, avoiding the use of the GAC and strong names ?

Thank you in advance.

CD

2 Answers

Micky Duncan

7/30/2007 4:11:00 AM

0

Hi,
If you want to place things into the GAC it must be strong named.

If for some reason you don't want to do that (because it itself relies on
3rd party assemblies that are not strong-named) then you don't have to make
it COM visible and be in at the GAC - use the /codebase option.

However, only one of your assemblies can use the /codebase option - you
cannot have two different copies in different paths. Ensure you unregister
before registering with /codebase as well.

Cheers,
MickyD

"Elvian" <roninfight@gmail.com> wrote in message
news:1184750701.031758.80840@j4g2000prf.googlegroups.com...
> Hello,
>
> I've got a little problem. I used to develop a component with Visual
> Studio .NET 2003 (.NET framework 1.1), and registering this assembly
> to COM interop with a function only writing keys in the registry
> (regedit).
>
> This way, I was able to include my activeX component in a former
> Visual Studio 6 c++ project (~10 000 files).
>
> The problem is when I switched to Visual Studio C# Orcas express
> Editionm and using the .NET framework 3.0
>
> The COM registration doesn't work anymore, and I'm trying to use
> regasm to register the assembly, but it doesn't seems to be working,
> because I'm not allowed to register the assembly in the GAC, nor to
> provide a strong name for it.
>
> Does anyone knows if there is a way, just like the wat I was doing
> things before, i.e. writing directly keys in the registry, or at
> least, avoiding the use of the GAC and strong names ?
>
> Thank you in advance.
>
> CD
>

christopher.dirand

7/31/2007 8:57:00 AM

0

On Jul 30, 5:11 am, "Micky Duncan" <micky_hatess...@nowhere.com>
wrote:
> Hi,
> If you want to place things into the GAC it must be strong named.
>
> If for some reason you don't want to do that (because it itself relies on
> 3rd party assemblies that are not strong-named) then you don't have to make
> it COM visible and be in at the GAC - use the /codebase option.
>
> However, only one of your assemblies can use the /codebase option - you
> cannot have two different copies in different paths. Ensure you unregister
> before registering with /codebase as well.
>
> Cheers,
> MickyD
>
> "Elvian" <roninfi...@gmail.com> wrote in message
>
> news:1184750701.031758.80840@j4g2000prf.googlegroups.com...
>
>
>
> > Hello,
>
> > I've got a little problem. I used to develop a component with Visual
> > Studio .NET 2003 (.NET framework 1.1), and registering this assembly
> > to COM interop with a function only writing keys in the registry
> > (regedit).
>
> > This way, I was able to include my activeX component in a former
> > Visual Studio 6 c++ project (~10 000 files).
>
> > The problem is when I switched to Visual Studio C# Orcas express
> > Editionm and using the .NET framework 3.0
>
> > The COM registration doesn't work anymore, and I'm trying to use
> > regasm to register the assembly, but it doesn't seems to be working,
> > because I'm not allowed to register the assembly in the GAC, nor to
> > provide a strong name for it.
>
> > Does anyone knows if there is a way, just like the wat I was doing
> > things before, i.e. writing directly keys in the registry, or at
> > least, avoiding the use of the GAC and strong names ?
>
> > Thank you in advance.
>
> > CD- Hide quoted text -
>
> - Show quoted text -

Thank you very much MickyD,

In fact, I ended with your solution, the /codebase option. It does not
really matter to register/unregister the assembly in the context I'm
working with, so it is the perfect solution.
Thanks again

CD