PC Review


Reply
Thread Tools Rate Thread

Assembly.LoadFrom when offline

 
 
Greg Bacchus
Guest
Posts: n/a
 
      20th Feb 2004
Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFrom.

E.g. Application downloads the assembly while it in online... next time it
is run it is offline and needs to still use that same assembly.
Assembly.LoadFrom throws an exception.

The downloaded assembly IS cached locally, in the assembly cache,
but how do I reference it from there? I was hoping that it would be
intelligent enough to automatically look in the download cache by itself
when I referenced the web assembly!! (But its not) The advantage with this
is it then
automatically handles trickel deployment. So if that assembly references
another assembly that does not exist, the framework automatically looks in
the referenced location of the first one - on the web. You see this wouldn't
work if I have to make a local reference to the assembly.

Cheers,
Greg



 
Reply With Quote
 
 
 
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      20th Feb 2004

"Greg Bacchus" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
> Does anyone know how to get an offline reference to an assembly that has
> been downloaded using Assembly.LoadFrom.
>


You can't, the problem is this: when you call Assembly.LoadFrom, the loader
has no way of knowing if its cached copy is up to date. So it has to go to
the web server to check if it has changed. If it hasn't it will then run
with the cached copy. Problem is, it still needs to be able to connect to
the web server to detect a change.


You definitely need to use another technology to achieve what you want.
Check the "application updater component", I guess it's exactly what you are
looking for.


< http://www.gotdotnet.com/team/windowsforms/appupdater.aspx>

Willy.


 
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
Unload an Assembly loaded via Assembly.LoadFrom() GD Microsoft Dot NET Compact Framework 4 10th Aug 2006 04:12 AM
Diif Assembly.Load and Assembly.LoadFrom =?Utf-8?B?R3VqanU=?= Microsoft VB .NET 1 22nd Jul 2005 09:54 AM
Assembly.LoadFrom when offline Greg Bacchus Microsoft C# .NET 2 19th Feb 2004 06:12 PM
Restricting access to Assembly.LoadFrom call within an assembly based on strong names Nicholas Paldino [.NET/C# MVP] Microsoft C# .NET 3 9th Dec 2003 08:32 PM
Re: AxImporter, Assembly.LoadFrom(), Assembly.GetTypes() Nicholas Paldino [.NET/C# MVP] Microsoft C# .NET 3 10th Jul 2003 02:48 PM


Features
 

Advertising
 

Newsgroups
 


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