The Artima Developer Community
Sponsored Link

C# Answers Forum
loading a dll

15 replies on 2 pages. Most recent reply: Jun 5, 2008 4:23 AM by Wimpie Ratte

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 15 replies on 2 pages [ « | 1 2 ]
Wimpie Ratte

Posts: 1
Nickname: wratte
Registered: Jun, 2008

Re: loading a dll Posted: Jun 5, 2008 4:23 AM
Reply to this message Reply
Advertisement
Assembly assembly = Assembly.LoadFile( filename );

with the above line of code, when you try to call

assembly.GetTypes()

you'll get the following error probably:
Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information

rather use

Assembly assembly = Assembly.LoadFrom( filename );

to load the file. (i just had the current problem and stumbled on this forum while trying to solve it)

Flat View: This topic has 15 replies on 2 pages [ « | 1  2 ]
Topic: J2ee .Net Interopearbility Previous Topic   Next Topic Topic: what are generic types used for?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use