5 2058
Hi,
I remember there are two solutions:
a) Playing with AppDomainSetup and AppDomain properties to ensure proper
values of PrivateBinPath and other properties used by the Fusion assembly
loader to locate assemblies.
b) Attaching a handler to the AssemblyResolve event and loading a requested
assembly with Assembly.LoadFr om from a known location.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today! http://www.x-unity.net/teststudio.aspx
"JonS." <Jo**@discussio ns.microsoft.co m> wrote in message
news:62******** *************** ***********@mic rosoft.com... Hi,
I posted this article ( http://msdn.microsoft.com/newsgroups...aea&sloc=en-us ) last week, and have yet to receive any replies. If someone could please give me further information I would greatly appreciate it.
Sincerely,
Jon
Hey Dmitriy,
I've been working with your first solution idea. The problem is, as I
belive I stated in the first post, it seems to me that even though I'm
unwrapping the loader in the new appdomain the remote loader, when I use the
AppDomain.Curre ntDomain.BasePa th it returns the base path of the AppDomain
the main application is running in, and not the new AppDomain I created the
loader in. Also, when I force load the path into the loader it returns a
serialization error stating that it doesn't have enough information or some
such.
Again, this is just driving my crazy trying to figure it out.
Sincerely,
Jon
"Dmitriy Lapshin [C# / .NET MVP]" wrote: Hi,
I remember there are two solutions:
a) Playing with AppDomainSetup and AppDomain properties to ensure proper values of PrivateBinPath and other properties used by the Fusion assembly loader to locate assemblies.
b) Attaching a handler to the AssemblyResolve event and loading a requested assembly with Assembly.LoadFr om from a known location.
-- Sincerely, Dmitriy Lapshin [C# / .NET MVP] Bring the power of unit testing to the VS .NET IDE today! http://www.x-unity.net/teststudio.aspx
"JonS." <Jo**@discussio ns.microsoft.co m> wrote in message news:62******** *************** ***********@mic rosoft.com... Hi,
I posted this article ( http://msdn.microsoft.com/newsgroups...aea&sloc=en-us ) last week, and have yet to receive any replies. If someone could please give me further information I would greatly appreciate it.
Sincerely,
Jon
Jon,
As far as I remember, when you load an assembly to an AppDomain, you have to
load all referenced assemblies as well. Handling the AssemblyResolve event
really helps in troubleshooting such problems, and this is the approach I'd
recommend you tried.
--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today! http://www.x-unity.net/teststudio.aspx
"JonS." <Jo**@discussio ns.microsoft.co m> wrote in message
news:62******** *************** ***********@mic rosoft.com... Hey Dmitriy,
I've been working with your first solution idea. The problem is, as I belive I stated in the first post, it seems to me that even though I'm unwrapping the loader in the new appdomain the remote loader, when I use the AppDomain.Curre ntDomain.BasePa th it returns the base path of the AppDomain the main application is running in, and not the new AppDomain I created the loader in. Also, when I force load the path into the loader it returns a serialization error stating that it doesn't have enough information or some such.
Again, this is just driving my crazy trying to figure it out.
Sincerely,
Jon
"Dmitriy Lapshin [C# / .NET MVP]" wrote:
Hi,
I remember there are two solutions:
a) Playing with AppDomainSetup and AppDomain properties to ensure proper values of PrivateBinPath and other properties used by the Fusion assembly loader to locate assemblies.
b) Attaching a handler to the AssemblyResolve event and loading a requested assembly with Assembly.LoadFr om from a known location.
-- Sincerely, Dmitriy Lapshin [C# / .NET MVP] Bring the power of unit testing to the VS .NET IDE today! http://www.x-unity.net/teststudio.aspx
"JonS." <Jo**@discussio ns.microsoft.co m> wrote in message news:62******** *************** ***********@mic rosoft.com... > Hi, > > I posted this article ( > http://msdn.microsoft.com/newsgroups...aea&sloc=en-us > ) last week, and have yet to receive any replies. If someone could > please > give me further information I would greatly appreciate it. > > Sincerely, > > Jon
I've found the answer to this, and most other dynamic loading and unloading
problems at the following location: http://www.codeproject.com/csharp/Dy...sp#xx1025463xx
I know I'm not the only one who would have these problems, which is why I'm
so surprised to find so little information on it. Anyways, please let me
know if there are any further questions.
Sincerely,
Jon
"JonS." wrote: Hi,
I posted this article ( http://msdn.microsoft.com/newsgroups...aea&sloc=en-us ) last week, and have yet to receive any replies. If someone could please give me further information I would greatly appreciate it.
Sincerely,
Jon
If the base directory of your new domain is not a sub-directory of the
existing domain then you will have problems with this code "as is", but it
should give you the pointers you need [no pun]. The problem with this is
that the loader class needs to be accessible from both assemblies, and it
also has the issue that is a 'dll' is located in both the main directory and
the sub-directory then the main one will load first (yeah, should not
happen, but I have seen users drag copies of old files all over the place).
Did'nt see you post until now - but if you are still getting stuck continue
the thread as I will put a watch point against it.
Not an expert by no means, but ...
- Colin.
"JonS." <Jo**@discussio ns.microsoft.co m> wrote in message
news:B1******** *************** ***********@mic rosoft.com... I've found the answer to this, and most other dynamic loading and
unloading problems at the following location:
http://www.codeproject.com/csharp/Dy...sp#xx1025463xx
I know I'm not the only one who would have these problems, which is why
I'm so surprised to find so little information on it. Anyways, please let me know if there are any further questions.
Sincerely,
Jon
"JonS." wrote:
Hi,
I posted this article ( http://msdn.microsoft.com/newsgroups...aea&sloc=en-us ) last week, and have yet to receive any replies. If someone could
please give me further information I would greatly appreciate it.
Sincerely,
Jon This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Sam Martin |
last post by:
Hi All,
I've got a problem where my application loads an assembly in the running
AppDomain when it shouldn't.
Ok, I've got a RemotingHost application that configs the remoting stuff and
then...
asks the user for a list of .net DLLs.
the app then copies a these assemblies to a cache folder along with my
RemotingClient app. Once copies i config a AppDomain setup and create a new
|
by: ASayre |
last post by:
I'm currently developing a client that connects to a server and exchanges
data with the server back and forth. The client retains the data in specified
classes depending on what was received. While adding a plugin type API I ran
into the following problem:
I want users to be able to dynamically un/re-load their plugins as needed,
but without having to restart the client. Searching quickly pointed me to
articles on AppDomains. However...
|
by: Pete Davis |
last post by:
I'm confused about what precisely the limitations are on loading plugins in
separate app domains. In all my previous apps that supported plugins, I've
loaded them into the same domain as the app, but I've just started playing
around with separate AppDomains and I'm finding that I'm not having problems
where I expected I would, so maybe someone can help me understand a bit
better.
I've read that objects instantiated in separate AppDomains...
|
by: Joe Fallon |
last post by:
I have some complex logic which is fairly simply to build up into a string.
I needed a way to Eval this string and return a Boolean result.
This code works fine to achieve that goal.
My question is what happens to the dynamically created assembly when the
method is done running? Does GC take care of it?
Or is it stuck in RAM until the ASP.Net process is recycled?
This code executes pretty frequently (maybe 4 times per transaction) and...
|
by: Jody L. Whitlock |
last post by:
Okay, I've banged my head against a wall for over a year now. Maybe
I'm just a rock when it comes to this.
I've got a new project, a Windows Service. The "application" itself is
in a DLL that is referenced by the exe. I did this for ease of
updating, just copy my new DLL(s) into an update directory and restart
the service when convienant. when the service EXE starts, it checks
for anything in my update dir, copies them over to the...
| |
by: Michael Bray |
last post by:
I'm writing a library to provide plugin capability to my applications. It
does this by loading DLL's into a new AppDomain for each plugin that is
loaded. Now obviously when I write a plugin, I can make sure that my
plugins don't throw any exceptions. But I certainly can't guarantee that
other people writing plugins won't throw an exception. The problem is that
if one of these other plugins throws an exception, it brings down the
entire...
|
by: Fred Mertz |
last post by:
I'm working towards an MCTS cert and I'm having to learn a bunch of stuff
that I doubt I'd stumble across on my own. One such feature of .NET is
AppDomains; programatically creating new AppDomains and programmatically
loading/unloading assemblies in them.
Question:
What are some scenarios where I'd want to...
1 - programmatically create or destroy AppDomains
2 - load and unload assemblies in AppDomains?
|
by: |
last post by:
If this is simple, forgive my ignorance, but I'm coming from the
CompactFramework where we don't use AppDomains. I did a fair bit of archive
searching and couldn't find an answer and I got no responsed in the remoting
group after a week, so I'm throwing a little wider net this time.
I have a desktop app (FFx 2.0) developed with Studio 05 that loads
assemblies in a separate AppDomains from the primary UI. I'd like to be
able to hook up...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |