Deploy Assembly in GAC

G

Guest

There are several ways to deploy an assembly into the global assembly
cache:

1) Use an installer designed to work with the global assembly cache. This
is the preferred option for installing assemblies into the global assembly
cache

2) Use a developer tool called the Global Assembly Cache tool (Gacutil.exe)
provided by the .NET Framework SDK.

3) Use Windows Explorer to drag and drop assemblies into the cache.

*My question
I know Installshield can register assemblies in the GAC, but that's not an option.
Can't seem to get VS .NET Install Project to do it though. Is it possible to write an install
project in VS .NET 2003 to register a public strong-named assembly in the GAC?
I can get the installer to put the assembly in the GAC, but it does not register it properly.
Any help or insight would be greatly appreciated

SMW
 
P

Phil Wilson

By "register", I'm assuming it exposes COM interfaces, so you want the
equivalent of running regasm on the assembly. In the assembly properties in VS,
set the Register property to vsdraCOM. That causes the build to run regasm at
build time and extract the COM registration data into the MSI file. If you get
hold of Orca from the Windows Installer section of the Platform SDK and use it
to look in the MSI file, you should see your COM data in the Class table.
 
G

Guest

That is correct. It does expose COM interfaces. Running Regasm is exactly what I was looking in how to do. Unfortunately, I tried your suggestion with no luck. Everything seems fine, registers in GAC, Orca looks good with reg entries, but when I call the dll from an unmanaged source, like ASP, I still get the following error
HTTP 500.100 - Internal Server Error - ASP erro
Internet Information Service
Technical Information (for support personnel
Error Type
(0x80070002

If I run regasm and gacutil on the dll from the command line however, everything works as expected.
 
P

Phil Wilson

There's obviously something missing, so I'd recommend comparing the HKCR
registry entries in the regasm case and when you've installed the MSI. Have you
specified an explicit GUID in the class attributes? Have you got rid of any * in
the assemblyversion? If you don't nail them down they can easily change and
clients won't find your object. Running the fusion log viewer might show you a
log of a failure to find the class. A dumb C++ program that calls
CoCreateInstance and tries to call a method can give you an HRESULT that can
tell you what's wrong.
--
Phil Wilson [MVP Windows Installer]
----
Zeplynne said:
That is correct. It does expose COM interfaces. Running Regasm is exactly
what I was looking in how to do. Unfortunately, I tried your suggestion with no
luck. Everything seems fine, registers in GAC, Orca looks good with reg
entries, but when I call the dll from an unmanaged source, like ASP, I still get
the following error:
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Technical Information (for support personnel)
Error Type:
(0x80070002)

If I run regasm and gacutil on the dll from the command line however,
everything works as expected.
 

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