When you use BizTalk Server for development, you may sometimes need to invoke functions that have already been written into the assembly. In this case, the invoked assembly needs to be installed into the global program cache (the globally Assembly cache). Otherwise, you may see the following error log in the log for BizTalk Server:
Event Type: Error
Event Source: xlang/s
Event Type: None
Event id:10034
Date: 2006-8-25
Event: 13:01:18
Users: N/A
Computer: Uitv-fang
Describe:
An exception that was not caught terminated the service Callfunction.mainorch (F87583A7-9607-1E6B-7D79-2546662C7F19), instance 156a7c0e-2cea-4a56-b53b-213af7d7203d Could not load file or assembly ' MyFunction, version=1.0.2428.22802, culture=neutral, publickeytoken=3027498b2c98444d ' Or one of its dependencies. The system could not find the specified file.
Exception type: FileNotFoundException
Source: CallFunction
Target site: Microsoft.XLANGs.Core.StopConditions segment1 (Microsoft.XLANGs.Core.StopConditions)
Help Link:
Additional error messages: For more information, see the Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
To install an assembly into the GAC, first assign a strong name (strong name) to the assembly, which is actually a key for signing.
1. Select the start/All Programs/microsoft Visual studio. NET 2003/visual Studio. NET Tools/visual the studio. NET 2003 command prompt menu to enter the. NET 2003 Command Prompt window.
2. In the command prompt, enter: Sn-k c:/yoursnfile.snk.
3. Open the project AssemblyInfo.cs file you want to install, locate [Assembly:assemblykeyfile (")] code, and add the key file to it:
[Assembly:assemblykeyfile (@ "C:/yoursnfile.snk")]
4. Recompile the project.
5. Return to the. NET 2003 Command Prompt window and enter the following command:
Gacutil-i "C:/changetoyourpath/test.dll"
The contents of the double quotes are actually replaced by the actual assembly file name.