Question

I have a workflow project in my solution that referenced Microsoft.Activies.Extensions.dll 2.0.2.16

I used the NuGet Package Manager to upgrade to the current version 2.0.6.9

Deploying the web role that references the workflow project .dll to the cloud I get:

 Could not load file or assembly 'Microsoft.Activities.Extensions, PublicKeyToken=23b0c89d0d5ad43f' or one of its dependencies. The system cannot find the file specified.

I remote desktoped to the VM and checked the F:/approot/bin to see that neither version of the assembly was deployed.

Since this a NuGet package I can find it in my <Solution root>/Packages folder. I see the new folder created by NuGet but also the old version folder that was left behind although the assembly was not inside. I deleted that folder and put an assembly redirect in my web.config:

<dependentAssembly>
    <assemblyIdentity name="Microsoft.Activities.Extensions" publicKeyToken="23b0c89d0d5ad43f" />
    <bindingRedirect oldVersion="2.0.2.12" newVersion="2.0.6.9" />
  </dependentAssembly>

Clead, build, re-deploy via Publish.

The error persists, and digging into the approot/bin again shows that the assembly was still not deployed.

I, of course, have Copy Local set to true.

Why is it not getting deployed?

Was it helpful?

Solution

Ok, resolved from finding this article:

http://weblogs.asp.net/albertpascual/archive/2008/12/16/the-cloud-for-a-fast-deployment-of-proof-of-concepts.aspx

Turns out when a web-role references an assembly than in turn references other assemblies, those assemblies will not be deployed even if Copy Local = true.

The solution is to references those child dependencies directly in the web-role project with Copy Local to true.

Only then did they show up in my approot/bin upon deployment.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top