473,387 Members | 1,597 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,387 software developers and data experts.

Unloading a GUI Assembly

Hi

I have GUI assembly which is loaded into a seprate Appdomain using AppDomain::Load method, after using it's function i unloaded the assembly by calling the AppDomain.UnLoad() method. But i can still use the UI components displayed earlier when i loaded the Assembly. How is this possible, it should not show up or throw some exception when i use the controls right?

Please advice me how this behavior is possible even after i unloaded the assemblie's App Domain

Any body Please help me
Nov 16 '05 #1
5 1802
You did not unload the assembly, you did unload the appdomain.
Willy.

"vineeth" <an*******@discussions.microsoft.com> wrote in message
news:4A**********************************@microsof t.com...
Hi,

I have GUI assembly which is loaded into a seprate Appdomain using
AppDomain::Load method, after using it's function i unloaded the assembly
by calling the AppDomain.UnLoad() method. But i can still use the UI
components displayed earlier when i loaded the Assembly. How is this
possible, it should not show up or throw some exception when i use the
controls right?.

Please advice me how this behavior is possible even after i unloaded the
assemblie's App Domain.

Any body Please help me.

Nov 16 '05 #2
Hi Willy

As per the MSDN documentation, there is no way we can unload an assembly, only way is to unload the AppDomain where the assembly is loaded. What do u say about this.
Nov 16 '05 #3
I know that, but are you sure the assembly was loaded in a secondary domain,
or are you sure the assembly (code) was not used by or referenced in another
domain ? In all these cases the CLR will unload the domain but keeps the
assembly loaded.
Can you post a small but complete repro.

Willy.

"vineeth" <an*******@discussions.microsoft.com> wrote in message
news:94**********************************@microsof t.com...
Hi Willy,

As per the MSDN documentation, there is no way we can unload an assembly,
only way is to unload the AppDomain where the assembly is loaded. What do
u say about this.

Nov 16 '05 #4
Hi

If you use a Windows.Forms component in this assembly it is not possible
to unload it ...
When you load the assembly in a remote domain and use a control (for
example) in this assembly the assembly is loaded into the calling domain
too. Therefore when unloading the other domain you can use the stuff
from the assembly you wanted to unload with the remote domain.

If it is possible try to load the assembly with Load(byte[]) ... and
re-load them when you re-new the assembly. With this method you'll have
a memory leak but you're able to 'update' the GUI assembly.

btw. the IDEs do the same thing when you use custom controls in the
forms designer and recompile the project.

Regards
Mike
Hi,

I have GUI assembly which is loaded into a seprate Appdomain using AppDomain::Load method, after using it's function i unloaded the assembly by calling the AppDomain.UnLoad() method. But i can still use the UI components displayed earlier when i loaded the Assembly. How is this possible, it should not show up or throw some exception when i use the controls right?.

Please advice me how this behavior is possible even after i unloaded the assemblie's App Domain.

Any body Please help me.

Nov 16 '05 #5
I was not knowing the fact that, if i create a new AppDomain and call the Load method for the Windows Form based Assemblies it will also be loaded to the Default Domain.

In my case My GUI Assembly was loaded into the Default Domain also, that causes it not to unload, when i unload the new AppDomain created.

That clears my doubt.

Thanks for your help Mike and Willy.
Nov 16 '05 #6

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

Similar topics

1
by: LilleSkutt | last post by:
I want to use assemblies (Window Forms as .dll) so that I can replace the form while the main application is running. To accomplish this, I used Assembly.LoadForm to manually load the assembly when I...
1
by: Andy | last post by:
Hi everybody, i´m working on an application that loads different modules (dll files) via an assembly. I check the build version in that dll file and if a newer version exists, i want to update...
3
by: Andy | last post by:
Hi, i tried to load an assembly to an appdomain. The data output is correctly but the assembly is still in use after unloading the appdomain... What am I doing wrong? Please help! My...
2
by: Arthur Roodenburg | last post by:
Hello, I would like to unload an assembly after I finished my stuff. I tried to load the assembly in to an AppDomain like this: AssemblyName asmName =...
4
by: Igor | last post by:
I have an application which loads assemblies from assembly cache. Assembly cannot be unloaded from memory without unloading the entire AppDomain, so every time I compile assemblies with new...
1
by: Microsoft | last post by:
Hi all, I have some application which dynamically loads a module as a DLL Assembly. Both are written in C#. I also would like to be able to dynamically unload this assembly (i.e. to update the...
2
by: Benny Raymond | last post by:
Are there any good tutorials on how to unload a dynamically loaded assembly?
1
by: Basti | last post by:
Hello, I'm working with .Net 2.0. I tried to get attributes of an unloaded assembly. So, the sole way I know is to create a new child application domain, in this app domain I load the assembly,...
2
by: Tim | last post by:
Hello, I've finally managed to remotely load a DLL. I've expanded the code to load it in a seperate domain to unload the appdomain, which works to a certain extend. The host application always...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
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,...
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...

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.