Figure 1: Windows Initiated Processing Scenario
Figure 2: TI Assembly in VS 2012
Figure 3: TI Library Properties
Figure 4: Select Assembly from GAC form
1- Create the TI Assembly as you need and configure the calling model of the assembly to be “DirectCall, WCF, WS, BAHA”
2- Now in the same properties make sure you have set the Debug property to “True”
3- Now save the TI assembly and you will find the following are the generated artifacts in the output folder:
4- Now take notice of the generated CS file marked above. Now create a new class library project and name it as you see fit. In that Class library project make sure that the .NET version is set to 4.0 at least (as HIS 2013 is upgraded to .Net 4.0) and then add the generated CS file to that project ( you might even add it as a link to make sure if the CS file is re-generated it is automatically updated in the class library project)
5- Now make sure you add the following line to the AssemblyInfo.cs[assembly: System.CLSCompliant(true)]
6- Now go to the properties of the class library and make this library a signed library as you do with any C# library
7- Add references to the following assemblies:C:\Program Files\Microsoft Host Integration Server 2013\system\Microsoft.HostIntegration.TI.ClientContext.dllC:\Program Files\Microsoft Host Integration Server 2013\system\Microsoft.HostIntegration.TI.TBGen.dllC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.ServiceModel.dllC:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Web.Services.dll
8- Now build the assembly it should build successfully and then add it to the GAC using Gacutil.exe as you would do with any other assembly. The TI assembly is now GACed and ready to be used.
1- Since the TI assembly is a .Net 4.0 assembly it will be GACed in the .Net 4.0 GAC and hence will require the .Net 4.0 Gacutil to be handled. Which comes installed with VS 2012.
2- Now for some reason the HIS HostApps adapter is not linked correctly to the VS2012 installation folder and hence I had to change things a little to make sure it is able to see the TI assembly in the GAC.
3- Open the Regedit application and browse to the path “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework”
4- Add a new string value with the name “sdkInstallRootv2.0” and set the value of this string to “C:\Gacutil4”
5- Now open the .net 4.0 tools folder “C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools” and copy all the contents of this folder to the folder “C:\Gacutil4\Bin” (just create this folder).
6- Now open the BizTalk administration console.
7- Create a new send port in BizTalk
8- Select the HostApps as the adapter and then click configure and configure the connection string
9- Now click add and then add assemblies (GAC) option
10- Now you will see all assemblies installed in the .Net 4.0 GAC and you can select your TI assembly that you installed in Part 1 above
11- Now complete the configuration as usual and click ok to configure the send port
12- Now if you check the connection string created and compaire the TI GACed assembly with a normal one you will find this as below:
13- Now you can use this send port normally.
thank you