Publish-AzureServiceProject: Failed to generate package

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 2.5.0.0 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=1.0.0.0, 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

image

The solution is to remove the installations (if more than one version installed) and then reinstall the Azure SDK for .NET:

image

Note: In my case I had to install both the 2.5.1 and the 2.6 versions of the SDK.

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *