Editar

Compartilhar via


What Happens When You Deploy an Assembly from Visual Studio

This topic describes what happens when you deploy assemblies from Visual Studio into a BizTalk application on BizTalk Server.

You can deploy a project individually, or you can deploy all of the projects in a solution at the same time. Before deploying a project, either separately or as part of a solution, you specify the application into which to deploy its assembly in project properties, as described in How to Set Deployment Properties in Visual Studio. When you deploy a project or solution in Visual Studio, the assemblies are automatically built and deployed into the specified application. If an existing application in the local BizTalk group has the same name as the application specified in project properties, the assembly is deployed into the existing application; otherwise, a new application having the specified name is created and assembly is deployed into it. As part of this process, the assembly along with the orchestrations, pipelines, schemas, and maps that it contains (called "artifacts") are imported into the local BizTalk Management database and associated in the database with the specified application.

You can deploy the projects in a solution into the same BizTalk application or different BizTalk applications, even when you deploy the projects in a solution at the same time. The following diagram illustrates deploying three assemblies contained in a BizTalk solution in Visual Studio into two different BizTalk applications.

Deploy BizTalk assemblies

After you deploy a project or solution, you can view and manage the assemblies and their artifacts from within the BizTalk Server Administration console or by using the BTSTask command-line tool.

Destination Locations

When deploying assemblies from Visual Studio, the destination location of an assembly defaults to the source location of the assembly. When installing or exporting an assembly from Visual Studio, if the "from" and "to" environment is not the same, the installation will fail. For example, if the source location is D:[path]/[filename] and the target machine installation machine does not have a "D" drive, the installation will fail.

This behavior is in contrast to adding a resource using BizTalk Administrator, in which case, the default destination location is %BTAD_InstallDir%. This environment variable expands to the install directory specified during installation.

To work around this issue, use the following procedure:

  1. In Visual Studio, deploy the assembly.

  2. After the assembly is deployed, open BizTalk Administrator.

  3. Modify the destination location as appropriate. For example, change the destination location to %BTAD_InstallDir%.

    Once you modify the destination location, this new location will be used as default for subsequent redeploys of the same assembly.

    For more information, see How to Deploy a BizTalk Assembly from Visual Studio.

Deploying Solutions vs. Projects

We strongly recommend that you always deploy a solution rather than an individual project. When you deploy an individual project and there are dependencies between an assembly you are deploying and another assembly, you must take a number of manual steps to complete the deployment. When you deploy a solution, however, BizTalk Server automatically take all of the steps to manage dependencies between assemblies. For more information, see How to Redeploy a BizTalk Assembly from Visual Studio.

The following diagram illustrates the steps that BizTalk Server takes to redeploy assemblies that have dependencies when you deploy a solution.

Deploying assemblies in a solution

See Also

Deploying BizTalk Assemblies from Visual Studio into a BizTalk Application