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

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"?>
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com.asm.v1">
<probing privatePath="subdir" />
</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 9248
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:
"Application 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:
"Application 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
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...
1
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...
1
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...
0
by: Marian Veteanu | last post by:
Hello, I have an HTML page that contains an <OBJECT> tag: <OBJECT id='XfdContainer'...
1
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...
2
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
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...
0
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...
1
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.