Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
Password Reminder
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.NET Framework 1.x For discussing versions 1.0 and 1.1 of the Microsoft .NET Framework.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 1.x section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old April 28th, 2006, 09:12 AM
Authorized User
Join Date: Aug 2004
Location: , , United Kingdom.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Installing non-assembly files in the GAC

OK - here is my problem. I've got an assembly which uses SQL Server DTS files, which in my code I attempt to load from the directory the assembly is currently running in. I want to strong name the assembly and install it in the GAC, but how do I get the DTS files in there too so the assembly can still locate them?

I ruled out the following:
a) Add the DTS files as embedded resources, since the LoadPackage function requires me to load it from a physical file (unless I do some horrible messing to extract the resource and save it to disk every time I need to use it!)
b) Install the DTS files in some known location (like Common Files) and change my code to attempt to load them from there if it can't find them locally. The problem with this approach is that the DTS files themselves may be different from version to version, so I need to be able to have side-by-side installation.

One approach I did try is making my assembly a multi-file assembly, with the other files being the DTS files. I managed to do this using al.exe and a nifty little tool called ilmerge.exe. However, this introduced oother problems.

Visual Studio doesn't provide any support for multi-file assemblies, so I had to do all the messing with command line tools in a post build event (since I program in VB and not C# I had to rely on some plug-ins available for download on the Microsoft site - see http://weblogs.asp.net/rosherove/arc...04/225431.aspx).

After finally getting this to work I discovered that when trying to build an installer, when the assembly is added as a Project Output or as a detected dependency, then the installer picks up the pre post-build () assembly.

Does anyone know of a simpler way of doing what I am trying to do???


Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Configuration files in GAC with .NET 3.5 prajip .NET Framework 3.5 8 June 19th, 2008 04:56 PM
Installing website on IIS: Could not load assembly Rabbit1986 ASP.NET 3.5 Basics 1 June 2nd, 2008 01:44 AM
Changing Settings.settings when assembly is in GAC evandro.paula .NET Framework 2.0 0 September 25th, 2007 09:54 AM
How to Read GAC lovesyogi C# 2 February 1st, 2007 05:20 AM
installing MSM files melvik C# 3 June 26th, 2004 07:01 PM

All times are GMT -4. The time now is 04:43 PM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.