XCopy Deployment

XCopy Deployment

Do upgraded applications have any limitations? Most upgraded applications contain COM controls and ActiveX references. Most of these controls have to be registered before they can be used. Visual Basic .NET components don t have this limitation they are self-describing. The information that would go into the registry for a COM component is compiled into the .NET application.

It is often said that .NET components support XCopy deployment (referring to the DOS multiple copy XCopy command). What this means is that you can install any Visual Basic .NET application simply by copying the EXE and any dependent DLLs from a directory on one machine to a directory on another machine (assuming that the .NET Software Development Kit [SDK] is already installed on the client machine). No registration, no extra installation steps. Plus, the application is isolated the DLLs it installs do not overwrite DLLs used by other applications.

XCopy deployment is extremely useful for client applications that are to be installed on perhaps thousands of client machines. With Visual Basic 6 applications, it is usually during one of these installations that something goes wrong your application installs a DLL that overwrites another DLL or another DLL s registration, which then breaks another application. These types of DLL conflicts are frustrating for both you, the developer, and your users.

Visual Basic .NET applications don t have this problem because an installation doesn t overwrite other files (unless you explicitly decide to overwrite an existing file), and other installations don t affect your application s files. However, if your application uses COM components ActiveX controls or COM libraries these components must be installed and registered, just as they must be in Visual Basic 6. This means two things. First, for each Visual Basic .NET application that contains COM components you must register the COM components, and second, if one of these COM components is overwritten, your application will stop working. If easy XCopy deployment is important to you, it s a good idea to remove the COM components from your application and replace them with .NET components. This step is especially relevant for applications that will be installed to multiple client machines.

How do you replace COM components with .NET components? In the next chapter, you ll see how you can do this by replacing common ActiveX controls with Windows Forms controls.



Upgrading Microsoft Visual Basic 6.0to Microsoft Visual Basic  .NET
Upgrading Microsoft Visual Basic 6.0 to Microsoft Visual Basic .NET w/accompanying CD-ROM
ISBN: 073561587X
EAN: 2147483647
Year: 2001
Pages: 179

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net