Home Page › Forums › BizTalk 2004 – BizTalk 2010 › Call .NET class from Orchestration (update assembly reference)
- This topic has 7 replies, 1 voice, and was last updated 9 years, 8 months ago by
community-content.
-
AuthorPosts
-
-
June 5, 2008 at 12:04 AM #19855
Morning
I am calling a .NET class from an Orchestration but when I update the .NET class BizTalk is still referencing the old assembly. How do I update the reference once the class has been updated?
Thanks
Byron
-
June 5, 2008 at 1:43 AM #19856
dear you have to restart the host instance as it always caches the last instance of an assembly.
regards,
Faisal
-
June 5, 2008 at 4:05 AM #19858
You will also have to rebuild and redeploy your Biztalk assembly that references the .NET assembly
-
June 5, 2008 at 4:32 AM #19860
Thanks for the replies.
I did resolve this by adding the assembly to the Resources folder of the application in the Administration Console and checking the Overwrite all checkbox.
Is this a correct way of resolving it?
Byron
-
June 5, 2008 at 5:19 AM #19862
Byron,
You don’t need to add it through the Add Resource functionality of the BizTalk Admin Console, because it isn’t a BizTalk assembly, BizTalk doesn’t need to know anything about it.
Just add it to the Global Assembly Cache (GAC) and restart the Host Instance that is running the orchestration that is invoking the assembly.
Be aware that you may have updated the Assembly version of the GACed assembly, in which case BizTalk won’t be able to find it as it will still be referencing the old assembly version. If you don’t want to re-compile the BizTalk project containing the orchestration to reference your new version, keep your helper assembly on the same version number, but increment the File Version – this is just meta-data and will be ignored when BizTalk tries to find your updated assembly, which it will because the version number has not changed, however you will be able to tell that you are running the correct version.
Hope this helps,
Rgds, Nick.
-
-
-
-
June 5, 2008 at 5:41 AM #19863
You could add the class project to the solution containing your orchestration project.
Then, in the orchestration project’s references, delete the existing reference to your class, and add a new reference from project, your class project will be available on the “projetcs” tab.
At this point, you can set the build profile to build and deploy both objects, the class and the orchestration.
Refresh and restart the host instance as noted each time you redeploy. You’re good to go.
-
June 5, 2008 at 2:16 PM #19867
It would be best practice to rebuild your Biztalk assembly if it references a .NET assembly that is rebuilt. These assemblies are tightly coupled, and while it might work by keeping the same assembly version (it will be able to load the assembly), there is no guarantee that any calls to that assembly will work correctly.
You can get weird and bizarre errors running mismatched assemblies.
-
July 13, 2010 at 8:36 AM #25224
good job guys..
-
-
-
-
AuthorPosts
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.