Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / November 2006

Tip: Looking for answers? Try searching our database.

load assembly into new App Domain

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ron M. Newman - 29 Nov 2006 22:00 GMT
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
Jon Shemitz - 29 Nov 2006 22:54 GMT
> Hi, the load method of the AppDomain doesn't take a string filename.

But it does ....

Signature

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

Ron M. Newman - 30 Nov 2006 00:02 GMT
I was able to find this example:
Load(AssemblyName.GetAssemblyName(filename))

Is the AssemblyName class really required?

Ron

>> Hi, the load method of the AppDomain doesn't take a string filename.
>
> But it does ....
Jon Shemitz - 30 Nov 2006 00:44 GMT
> I was able to find this example:
> Load(AssemblyName.GetAssemblyName(filename))
>
> Is the AssemblyName class really required?

No. Look at AppDomain.Load(string).

Signature

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

Ron M. Newman - 30 Nov 2006 15:07 GMT
Hi,

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

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

How come?

Ron

>> I was able to find this example:
>> Load(AssemblyName.GetAssemblyName(filename))
>>
>> Is the AssemblyName class really required?
>
> No. Look at AppDomain.Load(string).
Jon Shemitz - 30 Nov 2006 18:45 GMT
> Filename is: "c:\\folder\\myassembly.dll"
>
[quoted text clipped - 4 lines]
>
> How come?

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

Signature

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

Michael Nemtsev - 30 Nov 2006 19:34 GMT
Hello Ron,

Try to use MyDomain.LoadFrom
RN> Hi,
RN>
RN> Filename is: "c:\\folder\\myassembly.dll"
RN>
RN> when I use MyDomain.Load(AssemblyName.GetAssemblyName(filename)) it
RN> works
RN> perfectly.
RN> when I use MyDomain.Load(filename) it throws a
RN> System.IO.FileLoadExceptionexception claiming it cannot load.
RN> How come?
RN>
RN> Ron
RN>
RN> "Jon Shemitz" <jon@midnightbeach.com> wrote in message
RN> news:456E2966.33A7AE41@midnightbeach.com...
RN>

>>> I was able to find this example:
>>> Load(AssemblyName.GetAssemblyName(filename))
[quoted text clipped - 7 lines]
>> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.