Solved

Command Line Compiler Errors: Compile a form as a dll

Posted on 2004-08-23
9
251 Views
Last Modified: 2010-07-27
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.
0
Comment
Question by:whittinga2
  • 4
  • 4
9 Comments
 
LVL 3

Expert Comment

by:DJ_Back-Q
ID: 11869947
First change this "/traget" for this "/target"
0
 
LVL 3

Expert Comment

by:DJ_Back-Q
ID: 11869973
Second looks like you might be missing a reference.
0
 
LVL 25

Expert Comment

by:RonaldBiemans
ID: 11870403
I think your missing    microsoft.visualbasic.vsa.dll
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

by:whittinga2
ID: 11870618
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.
0
 
LVL 3

Expert Comment

by:DJ_Back-Q
ID: 11870639
Then your missing a reference to the mscorlib namespace.
0
 

Author Comment

by:whittinga2
ID: 11870696
DJ Back-Q: Sorry - I've tried that before experts exchange.
0
 
LVL 3

Accepted Solution

by:
DJ_Back-Q earned 250 total points
ID: 11870766
Well I can assure you that your command line is well former, the only problem is that your are missing a reference or your code has something wrong.

Do you use Visual Studio??
0
 

Author Comment

by:whittinga2
ID: 11878803
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.
0
 

Author Comment

by:whittinga2
ID: 11879127
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.
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question