PC Review


Reply
Thread Tools Rate Thread

Assembly.Load(string name)

 
 
TS
Guest
Posts: n/a
 
      21st Nov 2007
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


 
Reply With Quote
 
 
 
 
Nicholas Paldino [.NET/C# MVP]
Guest
Posts: n/a
 
      21st Nov 2007
Could you perhaps provide a complete example which shows the issue?
Without seeing one, it's very difficult to tell.


--
- Nicholas Paldino [.NET/C# MVP]
- (E-Mail Removed)

"TS" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      21st Nov 2007
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/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.

 
Reply With Quote
 
TS
Guest
Posts: n/a
 
      21st Nov 2007
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

""Jeffrey Tan[MSFT]"" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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/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.
>



 
Reply With Quote
 
Jeffrey Tan[MSFT]
Guest
Posts: n/a
 
      22nd Nov 2007
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Assembly.Load get returns wrong assembly. =?Utf-8?B?VmxhZCBIcnlib2s=?= Microsoft Dot NET Framework 13 1st Feb 2007 12:40 PM
Using Assembly.Load(byte[]) to load multiple versions of dll, and AppDomain.AssemblyResolve Stephen Ahn Microsoft Dot NET Framework 1 8th May 2006 10:35 AM
Diif Assembly.Load and Assembly.LoadFrom =?Utf-8?B?R3VqanU=?= Microsoft VB .NET 1 22nd Jul 2005 09:54 AM
How to use Assembly.LoadFile to load assembly in different path? =?Utf-8?B?bGVlenE=?= Microsoft Dot NET Framework 0 19th Jun 2004 07:23 AM
Cannot CreateInstance of Assembly after loading it with Assembly.Load(byte[]) Dmitriy Krasnikov Microsoft Dot NET Framework 3 11th May 2004 07:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:13 PM.