Solved

Command Line Compiler Errors: Compile a form as a dll

Posted on 2004-08-23
9
253 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

761 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