Assembly.Load(string name)

T

TS

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
 
N

Nicholas Paldino [.NET/C# MVP]

Could you perhaps provide a complete example which shows the issue?
Without seeing one, it's very difficult to tell.
 
J

Jeffrey Tan[MSFT]

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.
 
T

TS

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
 
J

Jeffrey Tan[MSFT]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top