By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,534 Members | 865 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,534 IT Pros & Developers. It's quick & easy.

VB.NET Assembly installation on a Network Drive w/COM components

P: n/a
We have developed systems for a client with VB, SQL Server, IIS, and ASP. We
are in the process of doing all new work in .NET. We set up two directories
on a file server. One for the executables and one COM controls. Every use
maps to the
first directory (EXE) to run their programs. When they re-boot their
computer, we have a program in the startup that goes through the second
directory (COM) checking that all the current versions of the COM controls
we need are installed and installing them if they are not. We have home
grown COM components that we can change at will and the executables that use
them don't have to be changed. We would like to do something similar for our
VB.NET programs.

Our home-grown COM controls use other COM controls so re-writing them
comples us to replace the purchased COM conrols with managed code. In some
case we can't do that. We have a problem when we use a COM component in the
VB.NET assembly (DLL). We are told that the VB.NET DLL must be in the same
directory as the VB.NET executable and what's more the executable is locked
into a specific version of the VB.NET DLL. That would mean recompiling every
program that uses the VB.NET DLL when it is changed. Now the catch22, we can
get around the recompiling problem by strongly typing the VB.NET DLL and
putting it in the GAC, BUT you can't strongly type a VB.NET DLL that uses a
COM component.

It would seem that we must leave COM components out of our home grown VB.NET
DLLs.

Is there a different solution or am I incorrect in my assumptions?

David A. Beck
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hi David,

Thank you for using MSDN Newsgroup! My name is Peter, and I will be
assisting you on this issue.

Based on my understanding you wants to install an Managed Dll into GAC
which will consume an unmanaged COM object. I think you can achieve this by
generating Primary Interop Assemblies for the COM object, so that you can
put the managed code DLL which using the COM object into GAC.

Here are two article may help you.
Generating Primary Interop Assemblies
http://longhorn.msdn.microsoft.com/l...imaryinteropas
semblies.aspx

Registering Primary Interop Assemblies
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconregisteringprimaryinteropassemblies.asp

e.g.
1. tlbimp LibUtil.tlb /primary /keyfile:CompanyA.snk /out:LibUtil.dll

2. regasm LibUtil.dll

3. Using the LibUtil in an strongnamed managed DLL.

If you have any concern on this issue, please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #2

P: n/a
Peter:

I get a page not found on both of these pages.

Dab
"Peter Huang" <v-******@online.microsoft.com> wrote in message
news:3J**************@cpmsftngxa07.phx.gbl...
Hi David,

Thank you for using MSDN Newsgroup! My name is Peter, and I will be
assisting you on this issue.

Based on my understanding you wants to install an Managed Dll into GAC
which will consume an unmanaged COM object. I think you can achieve this by generating Primary Interop Assemblies for the COM object, so that you can
put the managed code DLL which using the COM object into GAC.

Here are two article may help you.
Generating Primary Interop Assemblies
http://longhorn.msdn.microsoft.com/l...imaryinteropas semblies.aspx

Registering Primary Interop Assemblies
http://msdn.microsoft.com/library/de...us/cpguide/htm l/cpconregisteringprimaryinteropassemblies.asp

e.g.
1. tlbimp LibUtil.tlb /primary /keyfile:CompanyA.snk /out:LibUtil.dll

2. regasm LibUtil.dll

3. Using the LibUtil in an strongnamed managed DLL.

If you have any concern on this issue, please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #3

P: n/a
Peter,

They work, OX just broke the url. I put it together and can now read it.

Dab
"Peter Huang" <v-******@online.microsoft.com> wrote in message
news:3J**************@cpmsftngxa07.phx.gbl...
Hi David,

Thank you for using MSDN Newsgroup! My name is Peter, and I will be
assisting you on this issue.

Based on my understanding you wants to install an Managed Dll into GAC
which will consume an unmanaged COM object. I think you can achieve this by generating Primary Interop Assemblies for the COM object, so that you can
put the managed code DLL which using the COM object into GAC.

Here are two article may help you.
Generating Primary Interop Assemblies
http://longhorn.msdn.microsoft.com/l...imaryinteropas semblies.aspx

Registering Primary Interop Assemblies
http://msdn.microsoft.com/library/de...us/cpguide/htm l/cpconregisteringprimaryinteropassemblies.asp

e.g.
1. tlbimp LibUtil.tlb /primary /keyfile:CompanyA.snk /out:LibUtil.dll

2. regasm LibUtil.dll

3. Using the LibUtil in an strongnamed managed DLL.

If you have any concern on this issue, please post here.

Regards,
Peter Huang
Microsoft Online Partner Support
Get Secure! www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.