By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,928 Members | 1,210 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,928 IT Pros & Developers. It's quick & easy.

Complie From Cmd Line

P: n/a
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
Share this Question
Share on Google+
10 Replies


P: n/a
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

P: n/a
"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

P: n/a
> 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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
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

P: n/a
"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

P: n/a
I opologise - good on you

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

This discussion thread is closed

Replies have been disabled for this discussion.