Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / May 2007

Tip: Looking for answers? Try searching our database.

app.config and probing

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
juan@msdnCompany.com - 29 May 2007 20:10 GMT
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.
Signature

Thanks,
Juan

Jeffrey Tan[MSFT] - 30 May 2007 07:52 GMT
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/archive/2006/08/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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
juan@msdnCompany.com - 30 May 2007 13:17 GMT
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.
Signature

Thanks,
Juan

> Hi Juan,
>
[quoted text clipped - 29 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
juan@msdnCompany.com - 30 May 2007 22:06 GMT
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.
Jeffrey Tan[MSFT] - 31 May 2007 03:05 GMT
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/subscriptions/managednewsgroups/default.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/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.