BeetleDev.com
info
contact
Monday, August 19, 2019
Beetle Blog
1
By: douglas - VB.net - 8/9/2002 12:00:00 AM

This tech note shows how to compile a VB.net source file using the command line and tools provided with the .NET SDK

Compiling into a library:
vbc /t:library /out:bin/myLibraryAssembly.dll myCodeBehindFile.vb

You may need to add references to the vb compiler:
vbc /t:library /r:System.dll /r:System.Web.Services.dll /r:System.XML.dll /out:MathService.dll MathService.vb

Compiling into an exe:
vbc /out:mySingleFileAssembly.exe myCodeBehindFile.vb

Note: You may need to set up path variables for your system if using vbc results in a "program not found error". The reason is the system can't find the vbc.exe program. Environment variables can be found in the control panel under "System". Your system path variable should include the paths to your compiler tools:
C:\Program Files\Microsoft.NET\FrameworkSDK\Bin\;
C:\Program Files\Microsoft Visual Studio .NET\Common7\IDE\;
C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\;
If you don't have access to the system variables, you may be able to put the path variable in your user path variable.

1

Beetle Blog v0.2.2


Copyright © 1997 - 2019 BeetleDev.com. All rights reserved.