The following may help with a variety of custom pipeline component issues, including why your “Debug” is not catching when you expect it to. There were times today, where I would do “Debug Attach” to the BizTalk Host Instance, and the component would never go into debug mode.
1. Check that date/time of the .DLL in the GAC. There’s a chance you compiled it and though you GAC’ed it but it didn’t. Here’s the folder name to check:
You might be using a Post Build Event like this to GAC the .DLL:
Check your View/Output in Visual Studio to see if you have message that it did or didn’t GAC successfully:
Example Successful GAC
1> Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 1> Copyright (c) Microsoft Corporation. All rights reserved. 1> 1> Assembly successfully added to the cache ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
Example Failed GAC
1> Microsoft (R) .NET Global Assembly Cache Utility. Version 4.0.30319.0 1> Copyright (c) Microsoft Corporation. All rights reserved. 1> 1> Failure adding assembly to the cache: The process cannot access the file because it is being used by another process. 1> 1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: The command "CALL "%VS140COMNTOOLS%vsvars32.bat" 1>C:\Program Files (x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(4714,5): error MSB3073: gacutil.exe /i "C:\Users\nrwalters\Documents\Visual Studio 2015\Projects\ABC.Common\ABC.Common.BizTalkPipelineComponentEmail\bin\Debug\ABC.Common.BizTalkPipelineComponentEmail.dll"" exited with code 1. ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped =========
Sometimes you have to close Visual Studio, then re-open it and do the ReBuild.
Once I was just doing “Build” and since the code didn’t change, it wasn’t rebuilding, and thus it wasn’t running the Post-Build Event, and thus the GAC didn’t get changed!
2. Always restart your host instance. If you have more than one, make sure you picked the right one.
3. When you do Debug Attach – you also have to make sure you select the proper BTNTSvc.exe. Use Task Manager to get the process ID based on the name, and then in Visual Studio, select based on the “ID” column.
Pipeline Components Directory?
Some blogs say that since BT 2006 this isn’t really needed; that you should just GAC your pipeline components.
Other people argue that it is still necessary. I seem to have success with the first otpion.