0
votes

When setting up Azure Continuous Deployment (AzureContinuousDeployment.11.xaml) build template with our own hosted TFS 2012 Build Controller - it seems that the workflow activity is bound to a specific version of WindowsAzure.StorageClient. Any idea why we are getting this Compilation Exception even though we have the Azure SDK 2.4 installed on the build controller?

WF Activity: Deploy application to Azure - Compilation Error

Exception Message: Could not load file or assembly 'Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. (type FileNotFoundException) Exception Stack Trace: at System.Activities.Statements.Throw.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

Our VSO project uses Azure SDK 2.4, but this is separate from the portion that uploads the CSPACK publish file (.csx) to the Azure Blob Storage for the Azure Cloud App.

1

1 Answers

0
votes

The build template activity DeployAzureCloudApp from Microsoft.TeamFoundation.Deployment.Worflow.dll references Microsoft.WindowsAzure.StorageClient.dll 1.7.0.0.

To work around this - we must copy the assembly to the TFS Build Controller folder on the server (where the TFSBuildServiceHost.exe resides). Another option would be to GAC the assembly.

Source: Microsoft.WindowsAzure.StorageClient.dll

Azure SDK Path: c:\Program Files\Microsoft SDKs\Azure.NET SDK\v2.5\bin

Target: Microsoft.WindowsAzure.StorageClient.dll

TFS 2012 Path: c:\Program Files\Microsoft Team Foundation Server 11.0\Tools
TFS 2013 Path: c:\Program Files\Microsoft Team Foundation Server 12.0\Tools

Evidently the assembly resolution isn't looking for it outside the Tools directory - it seems to be specifying an absolute path to locate it. Fusion assembly log never shows it probing for this assembly.

Powershell to Reproduce the FileNotFoundException Error

([System.Reflection.Assembly]::LoadFrom("Microsoft.WindowsAzure.StorageClient, Version=1.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35l")).FullName