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 / Compact Framework / February 2005

Tip: Looking for answers? Try searching our database.

Dinamically loaded assembly

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 in PDA 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
Daniel Moth - 31 Jan 2005 10:10 GMT
"Yesterday" vs "today" has more likely to do with versions.

When you reference an assembly, it will first look for an .exe and then for
a .dll extension - this is by design (an exe referencing another exe is
legal). Any particular reason you are naming them the same?

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

> Hello:
>
[quoted text clipped - 15 lines]
>
> Juan
Juan - 31 Jan 2005 11:04 GMT
There weren't any particular reasons when I created it, but now I can't
change it because of other reasons.

Still i don't understand why of the different dates can cause it to work. I
make some probes and I think it's a preferences trouble (as you said), if
they are called with the same name, the exe has priority over the dll, and
if they have not the same date, takes the dll correctly (with the same name)

The solution is to change the DLL name, but I can't do that :-)

Thanks for your help Daniel.

Juan

> "Yesterday" vs "today" has more likely to do with versions.
>
[quoted text clipped - 26 lines]
>>
>> Juan
Daniel Moth - 02 Feb 2005 14:39 GMT
A slight correction...

> "Yesterday" vs "today" has more likely to do with versions.
This should be: *definitely* has to do with versions. CF 1.0 versioning
rules dictate that major.minor.build should match. Look in your AssemblyInfo
file for changing those.

> When you reference an assembly, it will first look for an .exe and then
> for a .dll extension - this is by design (an exe referencing another exe
> is
Got this the wrong way round. First it looks for a dll extension and then
for an exe. So in your case it cannot find the dll and then loads the exe.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

> "Yesterday" vs "today" has more likely to do with versions.
>
[quoted text clipped - 26 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.