473,657 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Specify probing location WITHOUT app.config?

JD
I've got a Windows Forms application that I'd like to NOT have an app.config
file for. There are, however, a few "utility" assemblies used by the
application and I'd like them to be in a subdirectory of the main app
directory:

c:\mainapp
c:\mainapp\libr aries

I'm wondering if I can programmaticall y specify the "libraries" directory as
a location to probe for assemblies at runtime. I don't see anywhere that the
"privatePat h" for probing can be modified, except for in app.config... am I
out of luck on this one?

Regards,

JD
Jul 21 '05 #1
1 2739
>I've got a Windows Forms application that I'd like to NOT have an app.config
file for. There are, however, a few "utility" assemblies used by the
application and I'd like them to be in a subdirectory of the main app
directory:


You could add those to your current AppDomain programmaticall y:

AppDomain.Curre ntDomain.Append PrivatePath(<yo ur path>);

Should work.

Marc
=============== =============== =============== =============== ====
Marc Scheuner May The Source Be With You!
Bern, Switzerland m.scheuner(at)i nova.ch
Jul 21 '05 #2

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

Similar topics

2
2661
by: Vinoth Kumar | last post by:
hi all i wrote a windows service. i am trying to get it to use an app.config file. unfortunately, when the service starts, it assumes that the ConfigurationSettings file is in C:\Windows\System32. this is unacceptable to me. rather, i would like the service to assume that the app.config file is in
0
246
by: Siegfried Heintze | last post by:
I have an example of using Forms Authentication to specify roles stored in an SQL database from 2002 May MSDN magazine. Must I use a database to use the roles feature of forms authentication?
2
3142
by: GrantMagic | last post by:
I am currently managing a number of websites, all following the same structure. However, when I launch a new website, I have to go through every page to find and replace the base url's. I would like to store the url in the web.config file so I would only need to change this in one place. Does this create unnecessary overhead, or is this a good method to solve my problem
1
416
by: JD | last post by:
I've got a Windows Forms application that I'd like to NOT have an app.config file for. There are, however, a few "utility" assemblies used by the application and I'd like them to be in a subdirectory of the main app directory: c:\mainapp c:\mainapp\libraries I'm wondering if I can programmatically specify the "libraries" directory as a location to probe for assemblies at runtime. I don't see anywhere that the
0
1207
by: Rajiv Das | last post by:
..Net 2.0 --------- Assume I am on a non-domain network. The proxy asks me to authenticate whenever I want to access the net. I have an app, through which I wish to access web sites using HttpWebRequest. Now in the config file snippet below: <system.net> <defaultProxy useDefaultCredentials="false">
0
1487
by: Lunatic Magnet | last post by:
Hi I need a script to: 1. Create a Database 2. Specify the file locations for the log and DB files. 3. Set the owner. other info: SQL2005. using AD accounts not SQL, don't need to create any tables or views etc. just an empty database.
3
5324
by: Stephen Falken | last post by:
I need to validate incoming XML files in a VB.Net 2005 application that must adhere to a DTD. This DTD is the only schema these XML files need to validate against. How can I specify/load the DTD, either as a file in the application path (installed with the application), or better yet as an embedded resource? It will be onerous for the user to have to be sure a copy of the DTD is in the same directory as the importing XML file each time...
5
13336
by: cforcloud karulvan | last post by:
hi all, i am working on a ajax calendar program, where the user will click on a date and its corresponding event list will be displayed beside it (similar to http://www.google.com/calendar). there are day & week views, the event list is picked from a database and the page will never refresh anytime. am done up to this point! i would like to add a feature, where permanent links can be set for a day's event list. like when the user...
2
5913
by: =?Utf-8?B?TWFubnkgQ2hvaGFu?= | last post by:
Hello Guys, Just curious over the fact if i can store Image Location in Web.Config and then how can i extract that location in HTML <td style="width:1%" align="left" valign="middle"> <img alt="" src="<%# image Location' %>/Images/lhw_logo_black.jpg" id=headerImage runat=server /></td> <td style="width: 1%" align="right" valign="middle">
0
8312
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8827
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6169
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.