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 / New Users / January 2005

Tip: Looking for answers? Try searching our database.

Assembly dinamic load

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Juan - 31 Jan 2005 10:03 GMT
Hello:

I have a strange behaviour loading dinamically an assembly with
Assembly.LoadFrom. The DLL is in the same directory as the main EXE, and has
the same name :

AICA.exe
AICA.dll

When I implement( or copy manually) yesterday builded AICA.dll main
application takes it without troubles, but if I build now (today) a new
AICA.dll, the Assembly.LoadFrom static method returns the AICA.exe assembly,
instead of AICA.dll.

Anybody nows why occurs this?

Thanks

Juan
Dmitriy Lapshin [C# / .NET MVP] - 31 Jan 2005 16:01 GMT
Hello Juan,

The Framework considers the name of the file WITHOUT the extension to be the
assembly name (not sure if this can be overridden in the manifest).
Therefore, having two assemblies which differ only in extension is generally
not a good idea. You can however overcome this by having different version
numbers in the DLL and the EXE and by loading the assembly with the Load
method, specifying the desired version number.

But, if possible, I'd recommend that you renamed one of the files.

Signature

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

> Hello:
>
[quoted text clipped - 15 lines]
>
> Juan

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.