Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TFS Deployment to Azure Error: cannot find ClientPerfCountersInstaller.exe

I configured our implementation to use the Azure Caching provider to maintain session state between all cloud instances like described here: http://msdn.microsoft.com/en-us/library/windowsazure/gg185668.aspx

This created a new startup task on my csdef file that always fails with this error:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Windows Azure Tools\2.0\Microsoft.WindowsAzure.targets (987): CloudServices64 : Cannot find file named 'approot\bin\Microsoft.WindowsAzure.Caching\ClientPerfCountersInstaller.exe' for startup task Microsoft.WindowsAzure.Caching\ClientPerfCountersInstaller.exe install of role MyRole.Web.

The .exe in the nuget package and in the main folder is included in the source control that TFS uses for the deployment.

I found this previous question that addresses this same issue: Azure Deployment Error: cannot find ClientPerfCountersInstaller.exe

But the accepted answer states to just delete the startup task that installs the .exe needed for the caching to take place.

like image 844
amhed Avatar asked Dec 16 '22 08:12

amhed


2 Answers

Make sure the .exe is marked as CopyAlways so that it is copied to your \bin directory.

To do so, right click on the .exe in Visual Studio and select properties. Make sure it looks like this:

Copy Always Property setup

like image 184
Evan Avatar answered Dec 28 '22 08:12

Evan


I had a similar issue with a dedicate cache worker role, but in my case the Microsoft.WindowsAzure.Caching folder never showed up in VisualStudio. In the end, I had to open the .csproj file for the worker role project and this:

<None Include="Microsoft.WindowsAzure.Caching\ClientPerfCountersInstaller.exe.config">
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Microsoft.WindowsAzure.Caching\ClientPerfCountersInstaller.exe">
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Microsoft.WindowsAzure.Caching\PerformanceCounters.xml">
  <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

I put that within the same <ItemGroup> tag as the app.config file, and now it's deploying as it should.

like image 27
Sean Mahan Avatar answered Dec 28 '22 10:12

Sean Mahan