0

We are updating a BizTalk 2009 application that I inherited. I'm converting them into BizTalk 2013 R2.

I get the following reasonably famous error, when I try to re-compile

Exception Caught: Cannot load source/destination schema: MyCompany.Schema.AppConfig.  
Either the file/type does not exist, or if a project dependency exists, the dependent project is not built. 

There are only two posts in SOF related to this error:

Biztalk Map Destination Schema Imports Multiple Schemas

Reference trouble with BizTalk schema project in Visual Studio 2008

and only a few meaningful posts in elsewhere.

The solution has 4 projects organized as follows:

  1. Common (contains an 1 schema AppConfig.xsd file)
  2. Orchestration (1 Orchestration file)
  3. Schema (references an ASMX web service)
  4. Map (1 map file, references Schema and Common Projects)

The Map project attempts to translate an source message of type AppConfig to the type AppConfigBE which is one of the Complex Types in the Web Service.

I keep getting the compile time error above.

Tried all of the following, as recommended in the two SOF posts, and a few other posts on MSDN forums, but none of it worked.

  1. Tried alternating Copy Local on the Maps project (From true to false, and vice-versa)

  2. Tried Replacing schema on source and destination on the map file

  3. Schemas are referenced using fully qualified .Net type name

  4. Tried referencing the .dll as opposed to the Schema and Common projects.

  5. Updated the web reference; also removed and re-added the web references

Is there a solution/hot fix etc for this? Any other suggestions I can try?

UPDATE 1: We had to call Microsoft for help; the engineer took my project file to try on their computers; he said they too had the same problem and as a fix, recommended to set the Build Action property of the .BTM map file to None instead of BTSCompile. After this, the project builds successfully. He said to test the project with this build and let them know. What I'm not sure is, what are consequences of this? Many topics on Build Action refers to the schema files, not the map files in a BTS project. What is the standard Build Action for Map files?

Community
  • 1
  • 1
FMFF
  • 1,652
  • 4
  • 32
  • 62

2 Answers2

0

One more item is to clear any Assemblies from the GAC or re-GAC them with a Post-Build script.

Johns-305
  • 10,908
  • 12
  • 21
  • I tried this after your suggestion; the assemblies get added to the GAC here `C:\Windows\Microsoft.NET\assembly\GAC_MSIL`; still getting the same error. I tried opening the project in VS2008, the project's original dev environment. Even there I'm getting the same error. Any other suggestions I could try? – FMFF Feb 18 '15 at 19:37
0

I ran into the same problem. I needed to add

using Microsoft.XLANGs.BaseTypes;
using Microsoft.BizTalk.XLANGs.BTXEngine;
[assembly: Microsoft.XLANGs.BaseTypes.BizTalkAssemblyAttribute(typeof(BTXService))]

to the AssemblyInfo.cs into the project.

Jean-François Corbett
  • 37,420
  • 30
  • 139
  • 188