Re: Assembly.Load() exception



You did not specify the filename or you forgot to put the extention on the
filename.

TestModule needs to have an extention (.DLL or .EXE).

--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Charles Cox
VC/VB/C# Developer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

"Steve" <sss@xxxxxxx> wrote in message
news:exy0BxRIGHA.3056@xxxxxxxxxxxxxxxxxxxxxxx
> I'm playing with late binding and trying a very simple test to load an
> assembly
>
> In my "Host" application I have this code:
> <code>
> string modulePath =
> @"C:\PMDRepository\Tools\ManfBusProcMgr\Modules\TestModule\bin\Debug\TestModule";
> Assembly a = Assembly.Load(modulePath);
> </code>
>
> This is throwing the following exception:
> Could not load file or assembly
> 'C:\\PMDRepository\\Tools\\ManfBusProcMgr\\Modules\\TestModule\\bin\\Debug\\TestModule'
> or one of its dependencies. The given assembly name or codebase was
> invalid. (Exception from HRESULT: 0x80131047)
>
>
> The assembly that I'm trying to load is just a simple class library with
> one member and one property. Both were created in VS2005.
> I've done some initial googling, but nothing is popping up. Any ideas?
>
> Thanks for reading!
> Steve Klett
>


.



Relevant Pages

  • Re: Assembly.Load() exception
    ... Load takes a fully qualified assembly name, not the name of a file. ... >> You did not specify the filename or you forgot to put the extention on ... >> TestModule needs to have an extention. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ASM Cassette Images in TRS-80 Emulator
    ... David Keil's TRS-80 Model III/4/4P emulator. ... One of the progress asterisks changes to a C, and the load prematurely stops. ... Picking apart the *.CAS file that I was trying to load had initially suggested that the filename was "SPWAR" There is other data in the file, of course, but that plaintext seemed like a good guess. ...
    (comp.sys.tandy)
  • Re: Strange Failure Mode in FreeBSD 4.11
    ... # filename - will load the rules in the given filename ... I'm sure that if you put your custom rules in a shell file that you can use rc or cron to load those rules at boot time; you'd just need to be careful with rule numbering, maybe use ipfw sets for rule ordering, etc. ... Greg Barniskis, Computer Systems Integrator ...
    (freebsd-questions)
  • Re: Save/load values of text entry
    ... # not the fonction behind it. ... # set filex {file exist $filename} ... An entry widget is similar ...
    (comp.lang.tcl)
  • [DSPack]Rendering a 2nd video doesnt work on user pc, but fine on dev. pc
    ... The following code is designed to load a video. ... It works on the development pc but only the first time on the user pc. ... Folder + Filename are correct. ... StopPos:= ClipDuration; ...
    (borland.public.delphi.thirdpartytools.general)