|
You can easily use third-party (or external) DLL's in applications and compile them using
either Visual Studio .NET or the built-in .NET VBC and CSC compilers. Nearly any .NET-compliant
DLL can be added to your project, including COM objects.
Step 1: Place your DLL in the Bin folder of your application.
Step 2: If you are using the Visual Studio 2003 compiler for .NET Framework 1.1, add a reference to the DLL files. Open the project in Visual Studio 2003, open the Solution Explorer, expand the Project node in the tree and select the References node. Right mouse click and select Add Reference. You can then browse to the DLL in the Bin folder of your application and add this reference to your project.
Set your application to compile with Visual Studio .NET via the Application Wizard in Iron
Speed Designer.
Step 3: If you are using the VBC or CSC compiler, modify the CompileApplication.rsp file in your application folder to add a reference to the DLL. When Iron Speed Designer uses vbc.exe or csc.exe to compile the application, it uses
|
...\<Application Folder>\CompileApplication.rsp
|
to get its compilation settings. Using a text editor such as Notepad, add the name of the
DLL at the end of line starting with /reference separated by commas, e.g.:
/reference:BaseClasses.dll,System.dll,System.Data.dll,System.Drawing.dll,System.Web.dll,System.X ml.dll,Interop.DTS.dll,Interop.DTSCustTasks.dll,Interop.DTSPump.dll
|
In this example, the third-party DLL's are: DTS, DTSCustTasks, and DTSPump.
If you are using the .NET 2.0 Framework, you can omit Steps 2 and 3. Simply place the DLL files
in your application’s Bin directory.
Step 4: Fully qualify the namespace for the classes from the third-party DLL's you wish to use in CompileApplication.rsp.
- Import the namespaces in the /imports: section. This will import the namespaces for the whole application.
- Import the namespaces in individual classes (i.e. Visual Basic .NET classes in your applications) that make use of the namespaces.
- Fully-qualify the classes from the third-party DLL's when you make use of classes from these third-party DLL.
Step 5: Build and run the application.
|