473,503 Members | 5,382 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Complie From Cmd Line

Let's say I have the code below, and I want to complie this on a
machine that does not have VS2003 installed on it, but does have the
..net framework... Is it possible to complie this code below, and if so
how?

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As
Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form
Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents txtHello As System.Windows.Forms.TextBox
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
Me.txtHello = New System.Windows.Forms.TextBox
Me.SuspendLayout()
'
'txtHello
'
Me.txtHello.Location = New System.Drawing.Point(32, 96)
Me.txtHello.Name = "txtHello"
Me.txtHello.Size = New System.Drawing.Size(224, 20)
Me.txtHello.TabIndex = 0
Me.txtHello.Text = ""
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 273)
Me.Controls.Add(Me.txtHello)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
txtHello.Text = "Hello IT personal"
End Sub
End Class

Nov 21 '05 #1
10 2362
You need the 'VBC.exe' program which comes with the .NET Framework SDK to be
able to compile it from the command line

See:

..NET Framework 1.1 SDK:

Page:
-----

http://www.microsoft.com/downloads/d...1-a333c6b9181d

Direct Download:
-----------------

http://download.microsoft.com/downlo...e507/setup.exe

(108757 KB)

Command Line Compiling:
--------------------------

http://msdn.microsoft.com/library/de...lerOptions.asp

http://msdn.microsoft.com/library/de...lerOptions.asp

I hope this gives you the general Idea

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2
"pmclinn" <pm*****@gmail.com> schrieb:
Let's say I have the code below, and I want to complie this on a
machine that does not have VS2003 installed on it, but does have the
.net framework... Is it possible to complie this code below, and if so
how?

Public Class Form1
Inherits System.Windows.Forms.Form
[...]


Command-line for the "vbc.exe" command-line compiler:

'vbc main.vb /main:Form1
/libpath:C:\WINDOWS\Microsoft.NET\Framework\v1.1.43 22
/r:Microsoft.VisualBasic.d
ll /r:System.dll /r:System.Windows.Forms.dll /r:System.Drawing.dll
/imports:Syst
em /imports:System.Drawing /imports:System.Windows.Forms /target:winexe
/out:bla
..exe'

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
> You need the 'VBC.exe' program which comes with the .NET Framework SDK
to be
able to compile it from the command line


Hmm?

vbc comes just with .NET Framework Redistributable, doesn't it?

Roman
Nov 21 '05 #4
"Dragon" <no@spam.please> schrieb:
You need the 'VBC.exe' program which comes with the .NET Framework SDK

to be
able to compile it from the command line


vbc comes just with .NET Framework Redistributable, doesn't it?


Yes, "vbc" is included in the .NET Framework too. You don't need to install
the SDK in order to use "vbc".

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #5
According to the MSDN website it comes with the .NET Framework 1.1 SDK for
example.

Go to the MSDN site & search for 'vbc.exe' & it will tell you there.

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #6
"Crouchie1998" <cr**********@spamcop.net> schrieb:
According to the MSDN website it comes with the .NET Framework 1.1 SDK for
example.

Go to the MSDN site & search for 'vbc.exe' & it will tell you there.


A complete overview about which versions of "vbc.exe" are included in which
product/package can be found here:

<URL:http://support.microsoft.com/dllhelp/?dlltype=file&l=55&alpha=vbc.exe>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #7
This is completely awesome. Thank you Herfried, for writing a custom
cmd line string for me. It was just the example I needed to complie my
code. Without the sdk installed I also had to spell out the path to
the vbc.exe in qoutes to make this work but it compiled without issue.
Is there any security concerns around this vbc.exe from being on all
clients on a network that is using the .net framework structure? I
guess permissions on this file should really locked down.

-Peter

Nov 21 '05 #8
I doubt if he wrote it for you & just copied/pasted it from the MSDN site.

Its hardly brain surgery though

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #9
"Crouchie1998" <cr**********@spamcop.net> schrieb:
I doubt if he wrote it for you & just copied/pasted it from the MSDN site.


Huh? No, I wrote it on my own (I have rarely done that and it took me some
minutes to do that... :-/). The MSDN documentation on "vbc.exe" contains
only very basic sample command-lines.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #10
I opologise - good on you

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

65
12505
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
3
1356
by: pmclinn | last post by:
I read this: http://www.devx.com/amd/Article/21313 And I wanted to try it out on my system. I'm running on windows xp64 and vs 2003. I want to complie some of my appz in 64 bit editions. ...
1
3694
by: Maxwell | last post by:
Hello, I having having oodles of trouble using the std lib in my MC++ (VS.NET 2003) Class library. I figured out a simple sample to reproduce the errors I am having. Create a MC++ (VS.NET 2003)...
3
3019
by: Double Echo | last post by:
Hi all, I'm using PHP 4.4.2, and use PHP on both the command-line and the web. I am running PHP on SuSE 10 Linux , in a VMware 5.5 workstation, using Apache 2.0.55 , on my Dell laptop. ...
9
5188
by: Adi | last post by:
Hello eveyone, I wanna ask a very simple question here (as it was quite disturbing me for a long time.) My problem is to read a file line by line. I've tried following implementations but still...
1
1134
by: Wing Siu | last post by:
I have 2 classes, which depends on each other and in different namespace. For example, ClassA need use ClassB, and Class B need use ClassA And because of some reason, we cannot using VS.Net to...
6
2666
by: Jacob Rael | last post by:
Hello, I have a simple script to parse a text file (a visual basic program) and convert key parts to tcl. Since I am only working on specific sections and I need it quick, I decided not to...
1
2009
by: navin123 | last post by:
When i try to run a jsp file tomcat throws an error sating cannot comple the jsp file com.jpaser........ error at line -1
13
2060
by: jcato77 | last post by:
I am having trouble figuring out my code and was hoping someone could point me in the right direction. Below is my code what I need to due is create a method to add and display the value of the...
0
7193
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1495
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.