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

Deploy Assembly in GAC

P: n/a
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
Jul 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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.
--
Phil Wilson [MVP Windows Installer]
----
"Zeplynne" <an*******@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
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

Jul 21 '05 #2

P: n/a
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.
--
Phil Wilson [MVP Windows Installer]
----
"Zeplynne" <an*******@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
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

Jul 21 '05 #3

P: n/a
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.
Jul 21 '05 #4

P: n/a
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.
Jul 21 '05 #5

P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com...
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.
Jul 21 '05 #6

P: n/a
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" <an*******@discussions.microsoft.com> wrote in message
news:BB**********************************@microsof t.com...
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.
Jul 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.