How to Add a File to an Application
This topic describes how to use the BizTalk Server Administration console or the command line to add a file to a BizTalk application. Files that you add to your application are copied to the installation folder when the application is installed. Files can also can be exported into the application's .msi file and moved to different deployment environments with the application.
Note
For instructions on adding a Readme file, see How to Link to a Readme File.
If you want to overwrite a file that already exists in the application, specify the Overwrite option. The overwrite option only works when both files have the same file name. If not specified, and a file already exists in the application with the same file name as the one being added, the add operation will fail.
Note
Unlike some other types of artifacts, you can have more than one file having the same file name in a BizTalk group.
Prerequisites
To perform the procedures in this topic, you must be logged on with an account that is a member of the BizTalk Server Administrators group. For more detailed information on permissions, see Permissions Required for Deploying and Managing a BizTalk Application.
To add a file to an application
Using the BizTalk Server Administration console
Click Start, click All Programs, click Microsoft BizTalk Server 20xx, and then click BizTalk Server Administration.
In the console tree, expand BizTalk Server Administration and the BizTalk Group containing the application to which you want to add the file.
Expand Applications and the application to which you want to add a file.
Right-click the Resources folder, point to Add, and then click Resources.
Click Add, select the file, and then click Open.
In the File type drop-down list, select System.BizTalk:File.
In Destination, type the full path of the location where the file is to be copied when the application is installed from the .msi file, including the file name. The default is %BTAD_InstallDir%, the application installation folder. If this path is not provided, the file is not copied to the local file system during installation.
When finished, click OK.
Using the command line
Open a command prompt as follows: Click Start, click Run, type
cmd
, and then click OK.Type the following command, substituting the appropriate values, as described in the following table:
BTSTask AddResource [/ApplicationName:value] /Type:System.BizTalk:File [/Overwrite] /Source:value [/Destination:value] [/Server:value] [/Database:value]
Example:
BTSTask AddResource /ApplicationName:MyApplication /Type:System.BizTalk:File /Overwrite /Source:"C:\Source Files\File.txt" /Destination:"C:\New Files\File.txt" /Server:MyDatabaseServer /Database:BizTalkMgmtDb
Parameter Value /ApplicationName Name of the BizTalk application to which to add the file. If the application name is not specified, the default BizTalk application is used. If the name includes spaces, you must enclose it in double quotation marks ("). /Type System.BizTalk:File (This value is not case-sensitive.) /Overwrite Option to update an existing file. If not specified, and a file already exists in the application that has the same name as the file being added, the AddResource operation fails. /Source Full path of the file, including the file name. If the path includes spaces, you must enclose it in double quotation marks ("). /Destination Full path of the location where the file is to be copied when the application is installed from the .msi file. If the path includes spaces, you must enclose it in double quotation marks ("). If not provided, the file is not copied to the local file system during installation. /Server Name of the SQL Server instance hosting the BizTalk Management database, in the form ServerName\InstanceName,Port.
Instance name is only required when the instance name is different than the server name. Port is only required when SQL Server uses a port number other than the default (1433).
Examples:
Server=MyServer
Server=MyServer\MySQLServer,1533
If not provided, the name of the SQL Server instance running on the local computer is used./Database Name of the BizTalk Management database. If not specified, the BizTalk Management database running in the local instance of SQL Server is used.
See Also
Managing .NET Assemblies, Certificates, and Other Resources
AddResource Command: File
Creating and Modifying BizTalk Applications