472,096 Members | 1,461 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,096 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 9070
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Peter Blum | last post: by
1 post views Thread by Robert Scheer | last post: by
reply views Thread by Marian Veteanu | last post: by
2 posts views Thread by Jiho Han | last post: by
8 posts views Thread by Subra Mallampalli | last post: by
reply views Thread by Boni Lopez | last post: by
1 post views Thread by =?Utf-8?B?TUNN?= | last post: by
reply views Thread by leo001 | last post: by

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.