473,387 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Deploy Assembly in GAC

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
6 9609
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mqsash | last post by:
Hi Problem : Unable to deploy an assembly in IE, as a cab file. (Works fine when deployed as a dll ) Description : I have created a assembly (dll with no user interface)in C# which I deploy in...
1
by: Zeplynne | last post by:
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...
2
by: mqsash | last post by:
Hi Problem : Unable to deploy an assembly in IE, as a cab file. (Works fine when deployed as a dll ) Description : I have created a assembly (.dll) in C# which I deploy in IE. The dll name is...
0
by: ATS | last post by:
HOWTO Make a UserControl deploy an embedded resource. Please help, I need to embed an EXE into a C# UserControl that is run from script in an HTML web page as such: <html> <object...
3
by: AAA | last post by:
Hi, how could I deploy all my CF, SQLCE and my applicaiton .CAB file to pocket pc... I am now only able to run the msi setup file and install my application to my pocket pc, but I need to intall...
5
by: WT | last post by:
WTCRM.Settings.DBDataStore is a class in a main site deployed including everything in the same assmebly Address_Manager project is an external module that uses WTCRM as a reference....
1
by: Rich | last post by:
Hello, I am trying to deploy a VB2005 app which contains a ReportViewer control. I have added the Reportviewer control to the prerequisite list by click on Prerequisites in the...
0
by: Mircea Pleteriu | last post by:
Hi, I will present you a virtual scenario. Here it is. Say, we develop a web app consisting in one page only. The page displays a culture-dependent text and a switch (as a dropdown list) to...
4
by: meo | last post by:
Does .NET provide the way to deploy library to internal developer? I am trying to find the way to deploy a library file to developer for having integration to their application BUT the customer...
6
by: AGP | last post by:
I resisted for many years but I've just written my first app in .NET2005 and am looking to deploy my app with a third-party installer. ClickOnce and the VS Installer do not meed my needs and I am...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.