Search code examples
tfscrystal-reportsmsdeploymsbuild-task

TFS2010 MSDeploy with MSBuild transfering Crystal dependencies to bin


I have a solution file that is built and deployed with the following MSBuild Arguments in TFS2010:

 /p:DeployOnBuild=True 
 /p:DeployTarget=MsDeployPublish
 /p:CreatePackageOnPublish=True 
 /p:MSDeployPublishMethod=RemoteAgent
 /p:MSDeployServiceUrl=http://000.000.000.000/msdeployagentservice
 /p:DeployIisAppPath=API 
 /p:UserName=SSDomain\BuildAdmin
 /p:Password=BuildPassword

TFS gets the source, does the build, contacts the destination and copies the binaries and other resources using MSDeploy but the problem is that it copies some BS Crystal decision dll's in the \bin folder that makes my site blow up with a message:

Could not load file or assembly 'CrystalDecisions.ReportAppServer.ClientDoc' or one of its dependencies.

Once I remove these dll's the application runs fine?

I have IIS7 and am doing the build in TFS2010. If I use the exact same build definition and only change the configuration manager to use for this build definition to "debug" the build works fine and there is no copying of BS Crystal dll's If I use the QA config to do the build it decides that I need the Crystal dll's in the bin and everything falls apart.

All the config substitutions that I specify in Web.QA.config and log4net.QA.config does take place. Why does it decide to copy these dll's from the GAC (of I suspect the source server?) to the destination \bin folder? I do have the 64bit SAP CR runtime engine for .Net installed on both servers but the actual project does not have a reference to those files in CR.

Any help would come in handy. Thanks Jack


Solution

  • Ok, I got this to build by deleting the QA configuration, unloading the project, edit the .csproj, delete all ref to the QA configuration, reloading the project, re-added the QA config, right-click on web.config and adding transforms. I must have screwed up my .csproj file while trying to fix the problem. I use SlowCheetha done by Sayed and must say it has been working great for me!!