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 / C# / November 2007

Tip: Looking for answers? Try searching our database.

Assembly.Load(string name)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TS - 21 Nov 2007 00:16 GMT
for some reason i have code in a projcect that uses this method and it
works. i have almost the exact same project/files (i just renamed some
stuff) in another directory. the code works in the 1st application and the
name of the parameter is just the name of the assembly, real short. the
assembly to load is not strong named.

why doesnt the exact code work in the other application as well???
thanks
Nicholas Paldino [.NET/C# MVP] - 21 Nov 2007 02:20 GMT
Could you perhaps provide a complete example which shows the issue?
Without seeing one, it's very difficult to tell.

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> for some reason i have code in a projcect that uses this method and it
> works. i have almost the exact same project/files (i just renamed some
[quoted text clipped - 4 lines]
> why doesnt the exact code work in the other application as well???
> thanks
Jeffrey Tan[MSFT] - 21 Nov 2007 08:00 GMT
Hi TS,

Can you tell me where does the assembly that you wanted to load reside?
Does it reside in a private directory or GAC? Assembly.Load method uses the
standard CLR loading context and its probing order is listed below:
"How the Runtime Locates Assemblies"
http://msdn2.microsoft.com/en-us/library/yx7xezcf.aspx

Also, you may use Fuslogvw.exe tool to examine the details CLR loader logs:
"Assembly Binding Log Viewer (Fuslogvw.exe)"
http://msdn2.microsoft.com/en-us/library/e74a18c4.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.
TS - 21 Nov 2007 15:07 GMT
thanks, the problem was that i was trying to load an assembly in a component
referenced by the web app. i had a reference to this assembly from this
component but not from the web application, so i removed the reference in
the component and moved it to web app and it work.

thanks

> Hi TS,
>
[quoted text clipped - 34 lines]
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
Jeffrey Tan[MSFT] - 22 Nov 2007 03:12 GMT
Hi TS,

Thanks for your confirmation.

Ok, if you need further help, please feel free to post, thanks.

Best regards,
Jeffrey Tan
Microsoft Online Community Support

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.