473,395 Members | 1,679 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,395 software developers and data experts.

Installing to GAC using Deployment Project

Hi,

I have written an App in vb.Net (2003) which references Excel 2000. This
creates a Interop_Excel.dll which I need to reference in my project. All OK
so far.
I had to modify the Interop_Excel.dll and renamed it tm_Interop_Excel.dll
after modification. This new dll has a strong name and all the correct
attributes.

If I create a deployment project for my app, the tm_Interop_excel.dll is
placed in my application folder.

However I need this dll to be installed in the GAC. I can do this manullay
using GACUTIL, and all is OK.

When I create an installer, using VS 2003, I drag the dll form my
application folder into the Global assembly folder. (file system on target
machine).

When the installer is run, the tm_Interop_Excel.dll is placed into the GAC
but without a codebase entry and my app does not work. If I then run the
GACUTIL -i the codebase entry is added and all is ok.

I have found the GACUTIL is missing on some target computers so I cannot
relie on it being there.

So my question is, How do I create an installer which will automatically
place my tm_Interop_Excel.dll into the GAC correctly without using the
GACUTIL.exe.

Thanks in advance
--
Tim Marsden
Nov 22 '05 #1
4 5818
You're doing the right thing, but where is this codebase value you are
referring too? Codebase is usually referred to in the context of Regasm.exe
or a config file. Gacutil just puts assemblies in the GAC, like the
deployment project does.
--
Phil Wilson
[Microsoft MVP-Windows Installer]
Definitive Guide to Windows Installer
http://apress.com/book/bookDisplay.html?bID=280

"Tim Marsden" <TM***@newsgroup.nospam> wrote in message
news:8E**********************************@microsof t.com...
Hi,

I have written an App in vb.Net (2003) which references Excel 2000. This
creates a Interop_Excel.dll which I need to reference in my project. All
OK
so far.
I had to modify the Interop_Excel.dll and renamed it tm_Interop_Excel.dll
after modification. This new dll has a strong name and all the correct
attributes.

If I create a deployment project for my app, the tm_Interop_excel.dll is
placed in my application folder.

However I need this dll to be installed in the GAC. I can do this manullay
using GACUTIL, and all is OK.

When I create an installer, using VS 2003, I drag the dll form my
application folder into the Global assembly folder. (file system on target
machine).

When the installer is run, the tm_Interop_Excel.dll is placed into the GAC
but without a codebase entry and my app does not work. If I then run the
GACUTIL -i the codebase entry is added and all is ok.

I have found the GACUTIL is missing on some target computers so I cannot
relie on it being there.

So my question is, How do I create an installer which will automatically
place my tm_Interop_Excel.dll into the GAC correctly without using the
GACUTIL.exe.

Thanks in advance
--
Tim Marsden

Nov 22 '05 #2

Phil,
Many thanks for the swift reply.

When I use the GACUTIL, then find the entry in he GAC, right click and
look at properties, the is an entry for Codebase, which references the
location of the dll I installed using the GACUTIL.

If I check the GAC after I use the installer there is no entry for the
codebase on the dll's properties.

Do I need to do anything special because it is a interop dll?

Regards
Tim
On Mon, 14 Nov 2005 07:28:22 -0800, "Phil Wilson"
<pd*******@nospam.cox.net> wrote:
You're doing the right thing, but where is this codebase value you are
referring too? Codebase is usually referred to in the context of Regasm.exe
or a config file. Gacutil just puts assemblies in the GAC, like the
deployment project does.

Nov 22 '05 #3
Hi Tim,

If you need to mimic the process of 'gacutil' and/or 'regasm' because
they may be not in the target machine, you can use:
[C#]
using System.EnterpriseServices.Internal;
....
Publish p = new Publish();
// for GAC Installation
p.GacInstall(file); // for gac installation
....
p.GacRemove(file); // for gac removing
....
p.RegisterAssembly(file); // for registering assembly for interop
....
p.UnRegisterAssembly(file); // to unregister assembly
[/C#]
Regards,
Sebastian Wain
--
http://www.nektra.com

Tim Marsden wrote:
Phil,
Many thanks for the swift reply.

When I use the GACUTIL, then find the entry in he GAC, right click and
look at properties, the is an entry for Codebase, which references the
location of the dll I installed using the GACUTIL.

If I check the GAC after I use the installer there is no entry for the
codebase on the dll's properties.

Do I need to do anything special because it is a interop dll?

Regards
Tim
On Mon, 14 Nov 2005 07:28:22 -0800, "Phil Wilson"
<pd*******@nospam.cox.net> wrote:
You're doing the right thing, but where is this codebase value you are
referring too? Codebase is usually referred to in the context of Regasm.exe
or a config file. Gacutil just puts assemblies in the GAC, like the
deployment project does.


Nov 22 '05 #4
Thanks Sebastian

I will try this out as an alternative, many thanks

Tim

On 14 Nov 2005 11:21:28 -0800, "Sebastian Wain"
<se************@gmail.com> wrote:
Hi Tim,

If you need to mimic the process of 'gacutil' and/or 'regasm' because
they may be not in the target machine, you can use:
[C#]
using System.EnterpriseServices.Internal;
...
Publish p = new Publish();
// for GAC Installation
p.GacInstall(file); // for gac installation
...
p.GacRemove(file); // for gac removing
...
p.RegisterAssembly(file); // for registering assembly for interop
...
p.UnRegisterAssembly(file); // to unregister assembly
[/C#]
Regards,
Sebastian Wain

Nov 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Daniel | last post by:
what exact registry entries does the installing of a .net windows service create? either with installutil or with a deployment project.
3
by: John | last post by:
I have a package built in C#.Net. I have the deployment package all set. However, I have a file that needs to be installed in the project but I don't want it be overwritten by an older version of...
2
by: Johnny | last post by:
I have created my first application and stepped through the deployment walkthrough. I've created an deployment project which works very well. However, I several stored procedures that need to be...
0
by: forge | last post by:
Installing Merge Modules from C# Windows Form Application (not using a setup and deployment project) Hi, Currently, we have an InstallShield project that creates a setup.exe that only...
0
by: acteon | last post by:
Hello, I have a webservice written in C sharp that is using an IBM provided DLL. The project that installs my webservice has a .MSM merge module file for that DLL. When the .MSI file...
5
by: John | last post by:
Hi When I try to install a published app using a url like http://www.mydomain.com/publish.htm, it starts the download but then comes up with the eror given at the end below. I am installing the...
3
by: Mike P | last post by:
Last week I wrote a windows app, published it and then installed it on my local machine. It all worked perfectly. Now today when I try to run the app from my Start menu I get the error...
4
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I created a setup.exe/setup.msi installer using Visual Studio for my C# application, then copied it over to the network for others to use. It installs fine and the application works like it is...
3
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgRGVzYXJyb2xsbw==?= | last post by:
Hi misters, I continue installing; my production PC is Windows 2003 I need copy dll (C runtime DLL msvcr71.dll) to windows\system32 directory if not installed yet. I want create Setup...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.