473,406 Members | 2,208 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,406 software developers and data experts.

load assembly into new App Domain

Hi, the load method of the AppDomain doesn't take a string filename. If you
have a new AppDomain object you created and a string with the full pathname
of an assembly, how do you load it there? I can't seem to find examples
involving filenames.

thanks,
Ron
Nov 29 '06 #1
6 3270
"Ron M. Newman" wrote:
>
Hi, the load method of the AppDomain doesn't take a string filename.
But it does ....

--

..NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.
Nov 29 '06 #2
I was able to find this example:
Load(AssemblyName.GetAssemblyName(filename))

Is the AssemblyName class really required?

Ron

"Jon Shemitz" <jo*@midnightbeach.comwrote in message
news:45***************@midnightbeach.com...
"Ron M. Newman" wrote:
>>
Hi, the load method of the AppDomain doesn't take a string filename.

But it does ....

--

.NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.

Nov 29 '06 #3
"Ron M. Newman" wrote:
>
I was able to find this example:
Load(AssemblyName.GetAssemblyName(filename))

Is the AssemblyName class really required?
No. Look at AppDomain.Load(string).

--

..NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.
Nov 30 '06 #4
Hi,

Filename is: "c:\\folder\\myassembly.dll"

when I use MyDomain.Load(AssemblyName.GetAssemblyName(filenam e)) it works
perfectly.
when I use MyDomain.Load(filename) it throws a
System.IO.FileLoadExceptionexception claiming it cannot load.

How come?

Ron

"Jon Shemitz" <jo*@midnightbeach.comwrote in message
news:45***************@midnightbeach.com...
"Ron M. Newman" wrote:
>>
I was able to find this example:
Load(AssemblyName.GetAssemblyName(filename))

Is the AssemblyName class really required?

No. Look at AppDomain.Load(string).

--

.NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.

Nov 30 '06 #5
"Ron M. Newman" wrote:
Filename is: "c:\\folder\\myassembly.dll"

when I use MyDomain.Load(AssemblyName.GetAssemblyName(filenam e)) it works
perfectly.
when I use MyDomain.Load(filename) it throws a
System.IO.FileLoadExceptionexception claiming it cannot load.

How come?
Apparently, I have only used Load(string) with assemblies in the app
directory.

--

..NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.
Nov 30 '06 #6
Hello Ron,

Try to use MyDomain.LoadFrom
RNHi,
RN>
RNFilename is: "c:\\folder\\myassembly.dll"
RN>
RNwhen I use MyDomain.Load(AssemblyName.GetAssemblyName(filenam e)) it
RNworks
RNperfectly.
RNwhen I use MyDomain.Load(filename) it throws a
RNSystem.IO.FileLoadExceptionexception claiming it cannot load.
RNHow come?
RN>
RNRon
RN>
RN"Jon Shemitz" <jo*@midnightbeach.comwrote in message
RNnews:45***************@midnightbeach.com...
RN>
>"Ron M. Newman" wrote:
>>I was able to find this example:
Load(AssemblyName.GetAssemblyName(filename))
Is the AssemblyName class really required?
No. Look at AppDomain.Load(string).

--

.NET 2.0 for Delphi Programmers
www.midnightbeach.com/.net
What you need to know.
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Nov 30 '06 #7

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

Similar topics

3
by: Raveendra | last post by:
Hi! I am trying to create one new Application Domain and calling one Assembly in that created Application Domain. It is working fine with stand alone application. But I need to do the same with...
2
by: Razzie | last post by:
Hey all, I'm working on this project where I'm dynamically loading an assembly. Basically what I want is that I can just replace my old dll file with a new one without having to do anything...
2
by: brianbender | last post by:
I am trying to load and unload assemblies dynamically and call methods and properties when loaded into an Appdomain I can load assemblies all day in the current AppDomain without references and...
2
by: Shige | last post by:
I have a .Net website hosted on another IIS6.0. Whenever I tried to access my website after a long time, it will take forever to load, my browser will just show a blank white page and the progress...
22
by: Brett Romero | last post by:
If my UI app uses three DLLs and two of those DLLs reference something named utilities.dll, does the UI app load utilities.dll twice or does the compiler recognize what is going on and load...
2
by: chandu | last post by:
I want to load an assembly dinamically into another application with a button click. how to load and execute that dinamic assebly.. i tried like this copied that target assebly in bin folder...
1
by: chandu | last post by:
hello , i want to load and execute an existing dll in a applicaiton dynamically with out giving references etc... need to create separate appdomain or in same appdomain can i load and execute...
3
by: Peter | last post by:
Hi I can create types from dynamic loaaded assemblies (Assembly.Load) with Assembly.GetTyp( <typename) - OK I need a reference to the assembly (just Type.GetType() do not work ) now my...
2
by: =?Utf-8?B?UGFi?= | last post by:
Hello, I am confused with load assembly in AppDomain. I created ASP Web application, same business logic is realized in custom DLLs, and I need to load ones in my application. If I use...
4
hemantbasva
by: hemantbasva | last post by:
We have designed an aspx page having five ajax tab in it. the data of first four are designed on page whereas for the fifth tab it renders a user control named MYDOMAIN. in the tab container's even...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
0
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...

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.