嵌ったのでメモ。
WCF Service WebRole を含む Cloud Service を、Visual Studio 2013 Update 4 で Microsoft Azure にデプロイしたら、 パッケージを作るところでエラー発生。
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. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.5\Microsoft.WindowsAzure.targets
インストールしている Azure SDK やツールが壊れたのかと思い、個別にインストーラーを実行して修復。 するとパッケージの作成でエラーは出なくなった。
再度、Visual Studio 2013 で Microsoft Azure にデプロイすると、 今度は「IISConfigurator.exe が無い」みたいなエラーが発生。
The file provided is not a valid service package. Detailed error code: WCFServiceWebRole Invalid application runtime - a runtime component is missing:/base/x64/IISConfigurator.exe.
Twitter で @kosmosebi 氏に「Azure SDK を 2.5.1 にしたらいいかも」というアドバイスを頂いたので、 2.5.1 をインストールして再度デプロイを試みたが、同じエラーが発生。
最終的には @kosmosebi 氏のブログ記事
にある通り、Azure Authoring Tools をアンインストールしてリンク先のツールを入れることで、問題解消。
ほんと、今回は困った。