Question

My Azure deployment script on TFS always fails to locate the assembly Microsoft.Exchange.WebServices.dll when deploying to Azure.

I always get the following warning:

The project '...' is dependent on the following assembly: C:\a\src\Portal\Dev\packages\EWS-Api-2.0.1.0.1\lib\net35\Microsoft.Exchange.WebServices.dll. This assembly is not in the package. To make sure that the role starts, add this assembly as a reference to the project and set the Copy Local property to true.

However, I do not get this warning with our Continuous integration build script. The assembly was added to my web project via the NuGet package EWS-Api-2.0.

I confirmed that copy local is set to true on the assembly reference and the hint path is set properly in the project file and the path specified below was added to TFS.

<Reference Include="Microsoft.Exchange.WebServices, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>..\packages\EWS-Api-2.0.1.0.1\lib\net35\Microsoft.Exchange.WebServices.dll</HintPath>
</Reference>

I have seemed many people posting on similar issues but none of the solutions I found were applicable or corrected the issue. I ran the build with Diagnostic logging and I did not find anything of value to point to what could be causing the issue.

Does anybody have any suggestions?

Was it helpful?

Solution

Although not an ideal solution, I was able to resolve the issue by downloading the 32 bit version of the assembly from Microsoft here (it wasn't clear if the nuget package was 64 bit or 32 bit). It still wasn't working so I then added it to the project as content and set Copy To Output Directory to Copy if newer and it worked.

Again, I don't consider this an ideal solution. However, it did resolve the issue for me.

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