Thursday, October 29, 2020
Beetle Blog
By: douglas - - 8/9/2002 12:00:00 AM

This tech note shows how to compile a 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\;
If you don't have access to the system variables, you may be able to put the path variable in your user path variable.


Beetle Blog v0.2.2

Copyright © 1997 - 2020 All rights reserved.