0

I am using BizTalk 2020 and I have a project that I recently upgraded from BizTalk 2006. I have into the following error:

BTSTask.exe AddResource -Type:BizTalkAssembly -Source:"....\xxx.dll" -ApplicationName:"app1" -Options:GacOnAdd,GacOnImport,GacOnInstall Microsoft (R) BizTalk Application Deployment Utility Version 3.13.717.0 Copyright (c) Microsoft Corporation. All rights reserved.

EXEC : error : File "....\xxx.dll" is not a valid BizTalk assembly. [F:\GIT\xxx\xxx.Deployment\Deployment.btdfproj] Could not load file or assembly 'xxx.dll' or one of its dependencies. The system cannot find the path specified.

Command failed with 1 errors, 0 warnings.

What I have tried:

  1. I check all the referenced assemblies and they are correct and in the GAC.
  2. I have given access to the temp folder, for the account Network service.
  3. in the deployment section of the project I have provided the target application name.

I have seen that the orchestration that is failing is of type System.Biztalk.BiztalkAssembly where the project that are of type System.Biztalk.Assembly deployed successfully. Could as yet not determine why there is a difference in the projects.

I am using Deployment framework 5.8 if that is of help.

Dijkgraaf
  • 11,049
  • 17
  • 42
  • 54
Ivan
  • 7
  • 3
  • Check that the Assembly.Info for your BizTalk Project has the line `[assembly: Microsoft.XLANGs.BaseTypes.BizTalkAssembly(typeof(Microsoft.BizTalk.XLANGs.BTXEngine.BTXService))]` in it – Dijkgraaf Jul 08 '22 at 07:14
  • I check and the line is present. – Ivan Jul 12 '22 at 05:22

1 Answers1

0

Due to the error message...

"Could not load file or assembly 'xxx.dll' or one of its dependencies. The system cannot find the path specified."

...you likely have an unwanted, incorrect version, incorrect .NET Framework version, or missing DLL referenced by your DLL.

I suggest downloading a free decompiler such as Telerik JustDecompile or JetBrains dotPeek, opening up your DLL in it, and carefully inspecting the references. The tool might even flag the problematic reference. Carefully check that the referenced DLL's exist on disk, that they are for the correct BizTalk version and matching .NET Framework version. There's a good chance that something was overlooked in the upgrade from BizTalk 2006.

Thomas F. Abraham
  • 2,082
  • 1
  • 19
  • 24
  • I removed all none standard dll's and replaced the orchestration with new one with no variables. Still got the same error. I ended up creating a new project and moving all the problem orchestration to the new project with their respective references and it successfully deployed. One a side note, I got the same error when the deployment folder was incorrect, But I checked this and they were correct. – Ivan Jul 12 '22 at 05:23
  • Also check all references in the dll using ILSPY, but saw no references where the incorrect framework was targeted. Thanks for all the help guys, at least I got it deployed although the error still remains a mystery. – Ivan Jul 12 '22 at 05:27