VB.NET building DLLs
Posted on 2003-03-25
I have the standard version of VB.NET and I was reading a book on creating dll's from classes. I understand that the standard version does not provide a template to create class libraries. When I loaded the sample that came with the book I was however able to compile the sample into a dll. So without a template I tried to start a Windows Application project…remove the form…add a class and make my own dll class library. Sounded too easy and I didn’t think it would work and it didn’t. Told me that I was missing a Main Sub when I compiled it.
After comparing the example that compiled to a dll and my own attempt, I found that the output type property on my project was Windows Applications and I have no way to change it to DLL. The example didn’t show the name of its output property. I’m sure its DLL or Class Library or something like that but is restricted because of the VB.Net standard limitations.
So my question is: how does the example distinguish itself as a dll class library? Can I with a text editor or something, modify my file so that VB thinks it’s a dll class library so I can compile it into a dll?
Maybe a better solution would be ?
1. Start a new Windows Application to generate a new GUID and copy that line of code.
2. Load the dll example and replace the GUID with then new GUID
3. Replace the example class with my class
4. Try compiling to a DLL
I’m awarding the points to the easiest solution.