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

C# Libraries in Central location?

Haven't done much research on this, hoping someone can offer a quick
ref or solution to this.

If I create a group of support libraries I want to use in multiple
projects, is there some method you can use to reference a specific
folder you might define?

I know ideally all files are dumped into the same folder as the
executable and you call it a day.

But I will have multiple servers running Window Services that use the
support libraries I have developed.

I'd prefer to have a simple place defined like:

C:\Program Files\Common Files\MySupportLibraries

This way I could then distribute updates per each Server in one
location, rather than copy the updated Libraries to multiple
respective Folders.
Nov 15 '05 #1
2 1576
Hi,

Put all your shared assemblies in C:\Program Files\Common
Files\MySupportLibraries on each server
Register all above assemblies in GAC (Global Assembly Cache)

Note: You will have to put a strong name on each assembly to register them
in GAC

Soren
"Cider123" <ci******@hotmail.com> skrev i en meddelelse
news:55*************************@posting.google.co m...
Haven't done much research on this, hoping someone can offer a quick
ref or solution to this.

If I create a group of support libraries I want to use in multiple
projects, is there some method you can use to reference a specific
folder you might define?

I know ideally all files are dumped into the same folder as the
executable and you call it a day.

But I will have multiple servers running Window Services that use the
support libraries I have developed.

I'd prefer to have a simple place defined like:

C:\Program Files\Common Files\MySupportLibraries

This way I could then distribute updates per each Server in one
location, rather than copy the updated Libraries to multiple
respective Folders.

Nov 15 '05 #2
Cider123,
If you don't want all your assemblies in the GAC. You can still include them
in a common place.

There are two methods, that I know of, to inform your app where to find the
common assemblies. Unfortunately both methods require that the directories
to search be sub directories of the base directory (the directory where the
executable is found).

1. Use the runtime/assemblyBinding/probing entry of your app.config file:

<?xml version="1.0" ?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<!-- privatePath can be a semi-colon separated list of
directories -->
<probing privatePath="MySupportLibraries" />
</assemblyBinding>
</runtime>
</configuration>

2. Use the AppDomain.AppendPrivatePath to append the path to list of paths
to search, based on MSDN this sounds like it requires:

AppDomain.CurrentDomain.AppendPrivatePath("MySuppo rtLibraries");

If you can deploy all the Application Projects to the same directory the
above works great, otherwise the above won't work so well. Luckily the app I
am working on, it makes sense to deploy all the Application Projects in a
single folder. I then have various sub folders for different aspects of
support libraries.

Hope this helps
Jay

"Cider123" <ci******@hotmail.com> wrote in message
news:55*************************@posting.google.co m...
Haven't done much research on this, hoping someone can offer a quick
ref or solution to this.

If I create a group of support libraries I want to use in multiple
projects, is there some method you can use to reference a specific
folder you might define?

I know ideally all files are dumped into the same folder as the
executable and you call it a day.

But I will have multiple servers running Window Services that use the
support libraries I have developed.

I'd prefer to have a simple place defined like:

C:\Program Files\Common Files\MySupportLibraries

This way I could then distribute updates per each Server in one
location, rather than copy the updated Libraries to multiple
respective Folders.

Nov 15 '05 #3

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

Similar topics

2
by: drjonfox | last post by:
Central New Jersey PIG Meeting -- Python Interest Group In Princeton PIG/IP PIG/IP will hold its first meeting on Jan 19, 2005 at the Lawrenceville Library (Room #3). Jon Fox will speak about...
4
by: Wayne... | last post by:
While still being pretty new to C++ I'd like to produce some audio FX plug in's. S#o I was wondering if anyoner could point me at any known good libraries or resources. I'm a bit beliver in...
9
by: Heather | last post by:
I have created a database application consisting of a front end and backend file. Data entry and administration of the application are done at a central location. The next requirement is to be able...
7
by: PC Datasheet | last post by:
Looking for suggestions ---- A database was designed for a national automobile inspection program. In it's simplest form, the database has two tables: TblOwner OwnerID <Year/Make/Model owned...
1
by: Ramprasad A Padmanabhan | last post by:
I am a perl programmer and a c newbie. Is there a central place where I can get C libraries and C snippets , something like CPAN for perl. Suppose I want to know if there is a C library for...
3
by: Florida Coder | last post by:
I have the need to store some application specific configuration data to be used by a class library and or a windows service. I would like to do this in a fashion similar to the way we do with...
1
by: uli2003wien | last post by:
Dear group, i have the following setting: satellite databases in different locations with the same structure (and sometimes identical data) need to be replicated into one central database....
2
by: Apprentice | last post by:
Hi there, Is there a way in which I can specify at runtime to an application the locations of shared dynamic libraries on which it depends? I do not want to use LD_LIBRARY_PATH or other LD...
5
by: Matthew Wells | last post by:
Hello. I have fifty users using an mdb as a main file and an mdb with linked tables, queries, reports, and modules as a library. Each user has their own copy of the lib mdb. Could I jsut use...
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: 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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
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,...

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.