Link to home
Start Free TrialLog in
Avatar of whittinga2
whittinga2Flag for United Kingdom of Great Britain and Northern Ireland

asked on

Command Line Compiler Errors: Compile a form as a dll

I have created a form that I use when running tasks that gives the user a progress bar and feedback. Works very well when the form is incorporated into a project and instantiated from there. I would like to compile it - via the command line - to be a dll. I have tried several times to do this, and have got to 2 errors that I am unable to resolve:

1.Error: BC30002 Type 'INT32' is not defined.
2.Error: BC30451 Name 'Application' is not declared.

I have done a lot of research and I have found that I am referencing all of the correct assemblies needed to compile from the command line. The command I use is as follows:

vbc /traget:library /out:BusyBar.dll /reference:System.dll,System.Data.dll,System.Drawing.dll,System.Windows.Forms.dll,System.XML.dll frmBusy.vb

I would appreciate any help or feedback that could be offered.
Avatar of DJ_Back-Q
DJ_Back-Q

First change this "/traget" for this "/target"
Second looks like you might be missing a reference.
I think your missing    microsoft.visualbasic.vsa.dll
Avatar of whittinga2

ASKER

DJ Back-Q: Thank you for pointing out my spelling mistake - I can assure you I have not typed that into the compile command. What would the reference that is missing?

RonaldBiemans: I tried your suggestion and I still have the same errors.

I can see the application object in the system.windows.foms refernece in the object browser. I can also see the Int32 data type in mscorlib system namespace. I am at a loss.
Then your missing a reference to the mscorlib namespace.
DJ Back-Q: Sorry - I've tried that before experts exchange.
ASKER CERTIFIED SOLUTION
Avatar of DJ_Back-Q
DJ_Back-Q

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
DJ Back-Q: I am using VB .Net Standard. I have read several articles and I am assurred that with the SDK that you can do everything that is possible in studio - only without the GUI. I have developed the form in studio and would like to compile it to a DLL for distribution.
I have been able to solve my problem. I remember reading an article stipulating that in some cases the whole class or object has to be refernced through its complete namespace. I changed a reference to the Application.DoEvents object method to System.Windows.Forms.Application.DoEvents this eliminated this error. I also did the same for the Int32 datatype and declared the parameters as System.Int32. I thinks this arises because of the fact that both are objects - even the data type declaration.