473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Assembly.LoadFrom when offline

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.

Cheers,
Greg
Nov 15 '05 #1
2 2144
Hi Greg,

You should probably cache the downloaded assembly locally.
If your app is online, check for cached version availability, then,
optionally, check for a newer version available online. If the assembly is
available in the cache [and there is no newer version], use it from the
cache.

If your app is offline, check the cache. If the assembly is there, load it
from disk and proceed. If it is not there - prompt the user to go online to
download missing components.

P.S. Most of this burden can be laid on the framework if you use so-called
No Touch Deployment. The framework utilizes a facility known as Downloaded
Assembly Cache then to store downloaded assemblies on disk.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Greg Bacchus" <FB**********@spammotel.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
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.

Cheers,
Greg


Nov 15 '05 #2
The downloaded assembly IS cached locally (as you say 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!! 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.
Greg
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:uG**************@TK2MSFTNGP10.phx.gbl...
Hi Greg,

You should probably cache the downloaded assembly locally.
If your app is online, check for cached version availability, then,
optionally, check for a newer version available online. If the assembly is
available in the cache [and there is no newer version], use it from the
cache.

If your app is offline, check the cache. If the assembly is there, load it
from disk and proceed. If it is not there - prompt the user to go online to download missing components.

P.S. Most of this burden can be laid on the framework if you use so-called
No Touch Deployment. The framework utilizes a facility known as Downloaded
Assembly Cache then to store downloaded assemblies on disk.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Greg Bacchus" <FB**********@spammotel.com> wrote in message
news:O2**************@TK2MSFTNGP10.phx.gbl...
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.

Cheers,
Greg

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Greg Bacchus | last post by:
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...
4
by: Arnaud Debaene | last post by:
Hello group. I have an app which can load "plugins" assemblies that are described in the registry (each registry entry gives the full path to the plugin ..dll file). The plugins may be anywhere...
0
by: surya | last post by:
Hi, I am using Assembly.LoadFrom within a web service to load assemblies from a web site. This web site is in the same machine where I am running the web service. The...
1
by: Benjamin | last post by:
Hi, I'm currently writing a Web Services that interacts with a database. To allow me to use not just one database provider (for example, I could use MS Access, SQL Server or MySQL), the Web...
1
by: lgbjr | last post by:
Hi All, I am moving some of my MDI Child forms to DLLs. The first 3 forms worked fine. But the 4th one is causing me some grief! I use the following code to load a form from a DLL: Dim...
6
by: Steve | last post by:
I'm playing with late binding and trying a very simple test to load an assembly In my "Host" application I have this code: <code> string modulePath =...
6
by: shrishjain | last post by:
Hi All, I call Assembly.LoadFrom("C:\\MyDir\\MyAssembly.dll")- it works fine. However when I call the following, it fails: ...
4
by: =?Utf-8?B?SmFu?= | last post by:
I have a .NET 2.0 application divided in two assemblies; the exe and a dll. The application generates a plugin-dll which is then loaded in a separate AppDomain (along with a second instance of my...
3
by: dbhurt15 | last post by:
Let me say first that I'm brand new to .NET I'm having a small issue. I'm working on a large project. My part is using a .dll located in another directory. I'm having problems referencing to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.