Recently when creating a new service project in Azure I ran into this disturbing error when publishing from powershell:
Publish-AzureServiceProject : Failed to generate package. Error: Microsoft(R) Azure(TM) Packaging Tool version 126.96.36.199 for Microsoft(R) .NET Framework 4.0
Copyright ¸ Microsoft Corporation. All rights reserved.
F:\putti\AzurePHPPoc\ServiceDefinition.csdef: Warning CloudServices040 : The ‘schemaVersion’ attribute is unspecified. Please set the attribute to avoid this warning.
cspack.exe: Warning : CloudServices68 : No TargetFrameworkVersion specified for role AzurePHPPocWeb. Using .NET framework v4.0 for packaging.
cspack.exe: Error : Could not load file or assembly ‘Microsoft.WindowsAzure.Packaging, Version=188.8.131.52, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
It turns out this is an issue with the windows authoring tools
The solution is to remove the installations (if more than one version installed) and then reinstall the Azure SDK for .NET:
Note: In my case I had to install both the 2.5.1 and the 2.6 versions of the SDK.