Visual Basic .NET application compile and link options
This topic describes the various options available when compiling and linking Visual Basic .NET applications.
The following compile and link options are available for
building Visual Basic .NET applications on Windows with the Microsoft Visual Basic .NET compiler, as
demonstrated in the bldapp.bat
batch file.
Note: With
the release of Db2 12.1, versions 2.0, 3.0, and 3.5 of the .NET Framework are no longer supported by
the IBM® Data Server Provider for
.NET.
These .NET Framework versions are only available for use with 11.5 and earlier
releases. The .NET Framework version 1.1 is supported only by the IBM Data Server Provider for
.NET version 9.5
and earlier.
Compile and link options for stand-alone VB .NET applications using bldapp
Compile and link options for stand-alone
VB .NET applications:
- Variable for the compiler. The default is
vbc
, the Microsoft Visual Basic .NET compiler. - Reference the Db2® dynamic link
library for the .NET framework version 4.0.
- The
%DB2PATH%
variable represents root path of the Db2 product installation. The%DB2PATH%
variable is not present on IBM Data Server Driver for ODBC and CLI or Data Server Driver Package installation.
%DB2PATH%
- The
%BLDCOMP%
/r:"%DB2PATH%"\bin\netf40\IBM.Data.DB2®.dll
Compile and link options for the loosely-coupled sample
program, LCTrans
using bldapp:
- Variable for the compiler. The default is
vbc
, the Microsoft Visual Basic .NET compiler. - Output the
RootCOM
dynamic link library, used by theLCTrans
application, from theRootCOM.vb
source file, - Output the
SubCOM
dynamic link library, used by theLCTrans
application, from theSubCOM.vb
source file, - Create the dynamic link library from the input source file (
RootCOM.vb
orSubCOM.vb
). - Reference the Microsoft Windows System EnterpriseServices data link library.
- Reference the Db2 dynamic link library
for the .NET framework version 4.0.
- The
%DB2PATH%
variable represents root path of the Db2 product installation. The%DB2PATH%
variable is not present on IBM Data Server Driver for ODBC and CLI or Data Server Driver Package installation.
%DB2PATH%
- The
- Reference the Microsoft Windows System Data dynamic link library.
- Reference the Microsoft Windows System dynamic link library.
- Reference the Microsoft Windows System XML dynamic
link library (for
SubCOM.vb
). - Reference the SubCOM dynamic link library (for
RootCOM.vb
andLCTrans.vb
). - Reference the RootCOM dynamic link library (for
LCTrans.vb
).
%BLDCOMP%
/out:RootCOM.dll
/out:SubCOM.dll
/target:library %1.cs
/r:System.EnterpriseServices.dll
/r:"%DB2PATH%"\bin\netf40\IBM.Data.DB2®.dll
/r:System.Data.dll
/r:System.dll
/r:System.Xml.dll
/r:SubCOM.dll
/r:RootCOM.dll
Refer to your compiler documentation for additional compiler options.