从Cmd线编译 [英] Complie From Cmd Line

查看:61
本文介绍了从Cmd线编译的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

让我们说我有下面的代码,我想在没有安装VS2003的

机器上进行编译,但确实有

..net框架......下面是否可以编译这段代码,如果是这样的话

如何?


公共类Form1

继承System.Windows.Forms.Form


#Region" Windows窗体设计器生成的代码


Public Sub New()

MyBase.New()


' 'Windows窗体设计器需要此调用。

InitializeComponent()

''在InitializeComponent()调用后添加任何初始化
< br $>
结束子


''表格覆盖处理以清理组件列表。

受保护的重载覆盖子处理(ByVal处理为

布尔值)

如果处理那么

如果不是(组件什么都没有)那么

components.Dispose()

结束如果

结束如果

MyBase.Dispose(处置)

End Sub


''Windows窗体设计器要求

私有组件As System.ComponentModel.IContainer


''注意:以下过程是Windows窗体要求

设计器

''可以使用Windows窗体设计器修改它。

''不要使用代码编辑器修改它。

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)处理MyBase.Load

txtHello。 Text =" Hello IT personal"

End Sub

End Class

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

推荐答案

你需要.NET Framework SDK附带的''VBC.exe''程序才能从命令行编译它b / b $

见:


..NET Framework 1.1 SDK:


页:

-----

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


直接下载:

-----------------

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


(108757 KB)


命令行编译:

------------ --------------

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

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


我希望这能给你一般的想法


Crouchie1998

BA(HONS)MCP MCSE
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


" pmclinn" <下午***** @ gmail.com> schrieb:
"pmclinn" <pm*****@gmail.com> schrieb:
让我们说我有下面的代码,我想在没有安装VS2003的机器上进行编译,但确实有
.net framework ...下面是否可以编译这段代码,如果是这样的话
如何?

公共类Form1
继承System.Windows.Forms.Form
[...。]
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
[...]




vbc.exe的命令行命令行编译器:


''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''


-

MS Herfried K. Wagner
MVP< URL:http://dotnet.mvps.org/>

VB< URL:http://classicvb.org/petition/>



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/>


>您需要.NET Framework SDK附带的''VBC.exe''程序

才能
> You need the ''VBC.exe'' program which comes with the .NET Framework SDK
to be
能够从命令行编译它




嗯?


vbc只附带.NET Framework Redistributable,不是吗?


Roman



Hmm?

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

Roman


这篇关于从Cmd线编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆