This documentation is archived and is not being maintained.

Troubleshooting Deployment

The topics in this section cover various problems that you might encounter when creating deployment projects and deploying applications.

After installation, the application fails with a warning that MDAC 2.7 is required

Any application that references the System.Data namespace has a dependency on Microsoft Data Access Components (MDAC) version 2.7 that cannot be detected by the deployment tools. If MDAC 2.7 or later is not installed on the target computer, the application will fail. For more information, see Deployment and Dependencies.

To prevent this error, you should add a launch condition that can check for the correct version of MDAC and stop the installation if it is not found. For more information, see Adding a Launch Condition for Microsoft Data Access Components.

Note   An alternative to adding a launch condition is to include an MDAC merge module in your deployment project that will automatically install MDAC if needed. A merge module for MDAC is not included in Visual Studio .NET; however, one may be available at a later date on the Microsoft Web site.

An MFC application is not localized when installed on a computer where the locale is not English

When deploying an MFC application using a Visual Studio .NET deployment project, dependencies for the localized merge modules Mfc_loc_e.msm and Mfc_loc_fe.msm are not detected. The merge modules are included with Visual C++; the default installation location is \Program File\Common\Merge Modules. In order to distribute a localized MFC application, you need to manually add the two merge modules to your deployment project. For more information, see Deployment and Dependencies.

Assembly dependencies were not detected

When a project output group, assembly, or merge module are added to a deployment project, any dependent assemblies are automatically detected and added to the project. If a dependent assembly is loaded at run time by means of code, it cannot be detected by the deployment tools. You should avoid loading assemblies from code, if possible, or manually add the dependent assemblies to your deployment project. For more information, see Deployment and Dependencies.

Cannot find files on a Web server after installing

When installing a Web Setup to a Web server, the VirtualDirectory property for the Web Application folder and any Web Custom folders determines where files placed in those folders will be installed relative to the Web root. If this property is left blank, the files will be installed in the Web root folder (inetpub\wwwroot). For more information, see VirtualDirectory Property.

How do I install a Web application to the Web server root directory?

By default, when installing a Web application using a Web Setup deployment project, files are installed to a folder with the same name as the deployment project directly beneath the Web root folder. The VirtualDirectory property of the Web Application folder determines where the files are installed. To install to the Web root directory, change the VirtualDirectory property to null (delete the default value). For more information, see VirtualDirectory Property.

Web applications deployed using the Xcopy command cannot be debugged

When a Web application is copied to a Web server using the Xcopy command, Internet Information Services (IIS) is not automatically configured for your application. Debugging will not work because the application folder is not recognized as an application root.

After copying, you will need to set the new folder as an application root using the IIS Manager. In addition, you should set the permissions for the application's Bin folder to prevent DLLs from being downloaded.

Tip   Rather than using the Xcopy command, consider using the Copy Project command or a Web Setup deployment project. For more information, see Deployment Alternatives.

See Also

Deployment and Dependencies | VirtualDirectory Property | Deployment Alternatives | Deploying Applications and Components