create a loadable dll from vs 2005 environment (instead of by using csc)
-
Hello fellow programmers, I am one of the poor souls who tried to dynamically load a dll and discover its types, methods of types, etc. Now, an example in the vs2005 help environment (and also some online articles by c# programmers) shows that one can use the common line compiler csc with the option "/target:library" and call Assembly.LoadFrom("xxx.dll") etc. and there you go! It works. However, if I create a dll (not really a dll, as I have found out) through a class library or a control library project, it can't be loaded as an assembly (unless it is in the same solution as your calling application). I am wondering the difference between using the csc and the visual studio environment. Can I do the same trick from within the visual environment? What sort of C# project must I use to create the kind of library that csc creates? I will be grateful for any comment on the subject and pass it along to any other programmer who may tackle the same issue. Hurol
-
Hello fellow programmers, I am one of the poor souls who tried to dynamically load a dll and discover its types, methods of types, etc. Now, an example in the vs2005 help environment (and also some online articles by c# programmers) shows that one can use the common line compiler csc with the option "/target:library" and call Assembly.LoadFrom("xxx.dll") etc. and there you go! It works. However, if I create a dll (not really a dll, as I have found out) through a class library or a control library project, it can't be loaded as an assembly (unless it is in the same solution as your calling application). I am wondering the difference between using the csc and the visual studio environment. Can I do the same trick from within the visual environment? What sort of C# project must I use to create the kind of library that csc creates? I will be grateful for any comment on the subject and pass it along to any other programmer who may tackle the same issue. Hurol
You should use ClassLibrary type project to create dll in VS.
Saqib