473,786 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Assembly.LoadFr om when offline

Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFr om.

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.LoadFr om throws an exception.

Cheers,
Greg
Nov 15 '05 #1
2 2165
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**********@s pammotel.com> wrote in message
news:O2******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFr om.

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.LoadFr om 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.c om> wrote
in message news:uG******** ******@TK2MSFTN GP10.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**********@s pammotel.com> wrote in message
news:O2******** ******@TK2MSFTN GP10.phx.gbl...
Hi,
Does anyone know how to get an offline reference to an assembly that has
been downloaded using Assembly.LoadFr om.

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.LoadFr om 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
1324
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 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
4
2884
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 on the disk. Each plugin defines a class which implements an interface known to the app. The main app loads the plugin with Assembly.LoadFrom and then uses Assembly.GetTypes() and Type.FindInterface to find the concrete types in the plugin that...
0
1644
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 Assembly.LoadFrom(httpsite) method throws a file not found exception. I used the same code within a windows based application on the same machine and it worked, so if the windows based application can load the assembly why can't the web service find the same? I have been...
1
5022
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 Service dynamically loads up an assembly that implements an Interface I called IDatabase. To load the assembly and create an object, I wrote this function: private IDatabase LoadDatabasePlugin( string assemblyFile, string
1
2907
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 asmAssemblyContainingForm As = .LoadFrom("neiconv.dll") Dim TypeToLoad As Type = asmAssemblyContainingForm.GetType("neiconv.Frm_ND")
6
44489
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 = @"C:\PMDRepository\Tools\ManfBusProcMgr\Modules\TestModule\bin\Debug\TestModule"; Assembly a = Assembly.Load(modulePath); </code>
6
1839
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: Assembly.LoadFrom("C:\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\ ...\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\ MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\MyDir\\..\\...
4
4475
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 application dll). It's been working for months and now the it's not working from my application exe anymore but still working from NUnit when testing the dll. What could have changed in my exe? Some configuration thing in my VS2005 project?
3
1790
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 that external dll What I'm doing right now is using this on form load: Dim Asmpath As String = ("C:\Common\newLib.dll") Dim Asm As System.Reflection.Assembly = System.Reflection.Assembly.LoadFrom(Asmpath)
0
10163
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10108
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9960
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7510
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.