473,688 Members | 3,202 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

app.config and probing

I have a mixed mode application that uses several dlls, which most are native
and my new one is mixed. My new dll uses several dependent .NET assemblies.
I wanted to place these dependent .NET assemblies in a subdirectory, rather
than placing them all in the main directory. I added an app config file to
the main exe in the following form:

<?xml version="1.0"?>
<configuratio n>
<runtime>
<assemblyBindin g xmlns="urn:sche mas-microsoft-com.asm.v1">
<probing privatePath="su bdir" />
</assemblyBinding >
</runtime>
</configuration>

But when I try to load the dll, the app config subdir seems to be ignored.
Do mixed mode C++/CLI applications honor the probing privatePath? I was
going to use AppendPrivate path, but I see they are now depricating that
call. I would really like a general solution because I know I will be adding
more .NET assemblies in the future.
--
Thanks,
Juan
May 29 '07 #1
4 9271
Hi Juan,

This looks like a bug of CLR. Is your problematic machine Win2003? In
Windows Server 2003, if the application has the following SxS manifest,
then CLR will not use the application config file even if it exists. See
the blog entry below for more details and workaround:
"Applicatio n config file is not used if the application has certain SxS
manifest"
http://blogs.msdn.com/junfeng/archiv...09/692996.aspx

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

May 30 '07 #2
We were actually testing this on XP. But in VS 2005, it automatically adds
SxS manifest entries for the C runtime and MFC dlls and I add to the manifest
with the comctrl information so themes will work too. So I am beginning to
think the CLR has an issue in general that causes it to not read the app
config file. I think I will be forced to use the obsolete call for now and
hopefully by the time they remove the call they will have the bug fixed.
--
Thanks,
Juan
""Jeffrey Tan[MSFT]"" wrote:
Hi Juan,

This looks like a bug of CLR. Is your problematic machine Win2003? In
Windows Server 2003, if the application has the following SxS manifest,
then CLR will not use the application config file even if it exists. See
the blog entry below for more details and workaround:
"Applicatio n config file is not used if the application has certain SxS
manifest"
http://blogs.msdn.com/junfeng/archiv...09/692996.aspx

Thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

May 30 '07 #3
I figured out what was going on. I had an assembly identity in my additional
manifest, BUT I noticed the version number did not match that of my exe.
When I changed them to match, the config file then was magically used with
success.
May 30 '07 #4
Hi Juan,

Thank you for sharing the result. If you need further help, please feel
free to post, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no rights.

May 31 '07 #5

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

Similar topics

3
20891
by: Peter Blum | last post by:
I have built an assembly (dll) from which I expect third parties to subclass. As a result, when my assembly has a version change, it will cause any third party assembly based on it to break unless I establish a Publisher Policy file. So I have that. I have built a Windows app for the same product. This app prompts the user for a path to a third party assembly that depends on my assembly. It opens the third party assembly (Assembly.Load)...
1
2741
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
1
3935
by: Robert Scheer | last post by:
Hi. The docs say the <probing> element needs to refer to subdirectories of the application main directory. My windows application needs to locate an assembly in a directory above the application directory. Is it possible? Can I use the <probing> element to locate an assembly anywhere on the machine? Thanks, Robert Scheer
0
1510
by: Marian Veteanu | last post by:
Hello, I have an HTML page that contains an <OBJECT> tag: <OBJECT id='XfdContainer' classid='http://localhost/XfdRuntime/StarLIMS.Web.XfdRuntime.dll#StarLIMS.Web.XfdRuntime.XfdViewer.XfdContainer' VIEWASTEXT> </OBJECT> The StarLIMS.Web.XfdRuntime.dll assembly and the other statically
1
5686
by: Ivan | last post by:
Hi, I have moved an entire solution from .netframework 1.0 to 1.1; also I have migrated the solution to VS2003. After this I have added a new project (Web) to previous solution; I'm referencing a DLL from other project within the solution and including some user controls within my new project, but whenever I try to execute a new aspx I have coded I receive next error message (see below); the problem is that some times the Parser Error...
2
6798
by: Jiho Han | last post by:
This has been asked many times before but it seems there haven't been clear answers. I have an application root at http://localhost and subdirectories http://localhost/app1
8
34637
by: Subra Mallampalli | last post by:
Hi, I am trying to use <runtime> section within the web.config file. However, the contents of the <runtime> section seem to be ignored. What am i missing here? Is <runtime> section not used by web apps? Any help is greatly appreciated. Thanks,
0
1542
by: Boni Lopez | last post by:
Hi there, Supposed I have loaded into an current domain an assembly myasm.dll i.e. Appdomain.CurrentDomain.Load(bytes_of_myasm.dll) myasm.dll is signed and has a strong name Now I have a newasm.dll , this dll uses some classes from myasm.dll. If I am trying to create an instance of a class from newasm I get an
1
3160
by: =?Utf-8?B?TUNN?= | last post by:
By default there are a lot of settings automatically inserted into a web.config file. Where can I find detailed documentation about each individual setting? I am looking to streamline my site so that it does not load components that I do not require. But rather than go through trial and error of removing each one individually, I'd like to be able to read about what each setting does.
0
8590
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8528
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,...
1
8782
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
8786
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...
0
7621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6453
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
5807
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2964
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
3
1950
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.