This project is read-only.

BizTalk2006.Application.AddReferences Object reference not set to an instance of an object.

Jun 16, 2010 at 11:05 AM

Hi,

 

I'm trying to use the Microsoft.Sdc.Tasks.BizTalk2006.Application.AddReferences task to add a reference from one BT app to another. My msbuild code is:

 

<Target Name="BizApp">

   <!-- ... -->

    <ItemGroup>
      <BTRef Include="$(ReferencedAppName)"></BTRef>
    </ItemGroup>

    <BizTalk2006.Application.AddReferences Application="$(AppName)" Server="$(ServerName)" Database="$(BizMgmtDb)" ReferenceApplications="@(BTRef)" />
    <Message Text="Set References: @(BTRef)"></Message>

</Target>

 

When I run it I get the following error message

C:\Program Files\CruiseControl.NET\server\myApp\build.msbuild (153,5):  error: A task error has occured.
Message               = Object reference not set to an instance of an object.
ReferenceApplications = Microsoft.Build.Framework.ITaskItem[]
Application           = myApp
Database              = BizTalkMgmtDb
Server                = localhost
   at Microsoft.Sdc.Tasks.BizTalk2004.BizTalk2004TaskBase.GetBtsCatalogExplorer(String server, String database)   
   at Microsoft.Sdc.Tasks.BizTalk2006.Application.AddReferences.InternalExecute()   
   at Microsoft.Sdc.Tasks.TaskBase.Execute()


Any ideas what I'm doing wrong?

Many thanks,
felix

 


 

Jun 16, 2010 at 11:19 AM

I would guess that $(ReferncedAppName) is empty. Have you tried the MSBuild Extension Pack for BizTalk tasks? guidance is here http://www.msbuildextensionpack.com/help/3.5.6.0/html/b4a8b403-3659-cea7-e8c6-645d46814f98.htm

Jun 17, 2010 at 12:28 PM

Hi,

I tried the MSBuild Extension pack as you suggested and that wokred perfectly.

Thanks

Felix