The BizTalk Software Factory is a great automation tool for creating consistent solutions, project structures with consistent naming conventions. When I first started using the BizTalk Software Factory in combination with the BizTalk Deployment Framework, there are a few things I ran into. This post guides you trough the creation of the BizTalk Server Solution and addresses different points of attention a ran into. The sample solution can also be found here.
To be able to perform the steps to create your first BizTalk Software Factory Solution, make sure you have installed the prerequisites below.
- Windows Server 2012 R2
- SQL Server 2014
- BizTalk Server 2013 R2
Visual Studio 2013
- Microsoft Office Excel 2013
These versions of the software are the ones I have used because I am working with the latest version (2013 R2) of BizTalk Server. You can find other versions to use from BizTalk Server 2006 and up here.
Create The Solution BizTalKool.BSF.Example
When you have all the prerequisites installed, we can create our first BizTalk Server Solution with the BizTalk Software Factory
- Open Visual Studio 2013
- On the File menu, click New, and click Project…
- In the leftframe navigate under Installed to Templates\Guidence Packages\BizTalk Software Factory.
- Type in the name field BizTalKool.BSF.Example and select the correct location to store the new solution.
- Make sure that Add to source control is checked if you want to add this solution to your Source Control.
- Click OK and wait for the screen Create BizTalk Solution to appear.
- Type in the namespace field BizTalKool.BSF.Example
- Keep everything else default and click Finish and wait for the solution to be created.
- Solution is created with all the required projects.
Add The SettingsFileGenerator.xml
Ad this point we manually need to add some files to our solution. This way we can manage our Environment Settings file SettingsFileGenerator.xml directly from Visual Studio. These files are not added by default because every developer could have his or her own settings for their specific environment. In my case, all the developers would have the same settings for their local development environment. But more important, because the file is automatically added to source control this way, all the settings for the other environments like for example test, acceptance and production, are centrally managed and controlled via source control.
- Right click the folder Solution Items and choose Add, click on New Solution Folder,
- Name it Environment Settings
- Right click the folder Environment Settings we have just created and choose Add, click on Existing Item…
- Navigate to ..<Solution>
- Select SettingsFileGenerator.xml and click Add…
When you want to edit the SettingsFileGenerator.xml directly from Visual Studio, perform the following steps.
- Right click the SettingsFileGenerator.xml in the Solution
Explorer and click Open with…
- Click Add… and browse to <InstallDirectory>\Program File (x86)\Microsoft Office\Office 15\ and select EXCEL.EXE. Click Open
- Click OK twice and the SettingsFileGenerator.xml will be opened in Excel. The
next time you choose Open with…,
Excel will already be in the list of programs.
Add Additional Files To Source Control
Ad this point we need to add some additional dll files to source control. These files are needed if we want to successfully build the solution on another BizTalk Server environment or build server in case of Continuous Integration scenarios.
- Go to Team Explorer and click on Source Control Explorer
- Navigate to the location of your solution and right click on the empty area below the files and choose Add Items to Folder.
- Select References and click Next
- Select all the dll’s like below and click Include item(s)
- Click Finish
This completes all the steps needed to create the BizTalk Server Solution with the BizTalk Software Factory with the additional steps for managing environment settings and preparing the solution for continuous integration.