Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 1.0 and Visual Studio.NET > .NET Framework 1.x
|
.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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 28th, 2006, 09:12 AM
Authorized User
 
Join Date: Aug 2004
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???

Thanks






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 06:20 AM
installing MSM files melvik C# 3 June 26th, 2004 07:01 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.