i followed the following example of dynamically loading assemblies, but cannot get it to work.
no matter what i try, the load always returns null.
what i have done:
- have an assembly, which holds the interface - no namespace
- have an assembly, which implements the functionality of the interface - no namespace
- have an existing project in which i want to load the assembly - has namespace
- have renamed the .PE file to bin, so that the resource creates the GetBytes function
- have added the assembly (bin) to the resouces
- using “byte file = Resources.GetBytes(Resources.BinaryResources.test);” to load data, which works fine
- 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