Main Site Documentation

Assembly.Load always returns null


#1

i followed the following example of dynamically loading assemblies, but cannot get it to work.
https://www.ghielectronics.com/docs/128/dynamic-assembly-loading

no matter what i try, the load always returns null.

what i have done:

  1. have an assembly, which holds the interface - no namespace
  2. have an assembly, which implements the functionality of the interface - no namespace
  3. have an existing project in which i want to load the assembly - has namespace
  4. have renamed the .PE file to bin, so that the resource creates the GetBytes function
  5. have added the assembly (bin) to the resouces
  6. using “byte[] file = Resources.GetBytes(Resources.BinaryResources.test);” to load data, which works fine
  7. call "Assembly assembly = Assembly.Load(assemblyFile); "and the return is always null

tried "var assembly = Assembly.Load(assemblyFile); " as well

what am i doing wrong?
i have tried with namespaces, without, removed all references apart from Microsoft.spot.native and mscorlib, but it just does not want to work.

any pointers would be appreciated.
would have been good if the above mentioned document actually had a working project for download


#2

Thanks Andre,

the test\obj\Debug\be folder, but just realised it should be the le one.
thanks a lot, was going nuts here!!!

will try when i get back home.