Azure SDK 2.5.1 fails to Publish cloudService

拥有回忆 提交于 2019-11-30 10:32:29

问题


After successfully upgrading my cloud service to the new "Azure SDK for .NET 2.5.1" I got the following error when trying packaging/publishing.

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

The related line in the "Microsoft.WindowsAzure.targets" config file is 2930 which obviously is related to CSPack.

<CSPack
  ServiceDefinitionFile="@(TargetServiceDefinition)"
  Output="@(PublishServicePackage)"
  PackRoles="@(Roles)"
  SiteMapping="@(SiteMapping)"
  RoleProperties="@(RoleProperties)"
  ImportedModules="@(ImportedModules)"
  CopyOnly="false"
  >
</CSPack>

So I went on to create a fresh new Azure Cloud service in a fresh new project to see if something went wrong with the upgrade. Unfortunately the problem persists.

Is there a workaround or will I have to rollback to v2.4 (that will cause me significant amount of pain)

I am running on VS 2013 update 4.


回答1:


Sorry for the trouble, everyone. We are investigating what's causing this. It looks like there is an odd behavior with our installers where in some environments those two binaries are not installed correctly.

We did discover if the 2.5.1 Azure Authoring Tools is removed and reinstalled, the missing binaries will be installed correctly. So if you run into this issue, please remove Authoring Tools v2.5.1 from Programs and Features, and reinstall via either the Web Platform Installer or the direct download links:

http://download.microsoft.com/download/1/E/7/1E76DD6F-66F1-47E0-A76A-3BBAAC617316/MicrosoftAzureAuthoringTools-x64.msi

http://download.microsoft.com/download/1/E/7/1E76DD6F-66F1-47E0-A76A-3BBAAC617316/MicrosoftAzureAuthoringTools-x86.msi

Apologies for the inconvenience. We will continue the investigation.




回答2:


I searched locally for the required dll and found it in almost all previous versions of the Azure .Net SDK had it (from v2.0 onwards I believe).

So in order to fix this you need to copy the following dlls from the previous version v2.4 of the SDK to the similar location for v2.5.

SDK installation paths.

  • Src location: "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.4\bin"
  • Dst location: "C:\Program Files\Microsoft SDKs\Azure\.NET SDK\v2.5\bin"

Dlls to copy (missing):

  1. Microsoft.WindowsAzure.Packaging.dll
  2. Microsoft.WindowsAzure.ServiceModel.Common.dll

Since there may be a better answer to this I will not mark this as an answer yet.



来源:https://stackoverflow.com/questions/29281710/azure-sdk-2-5-1-fails-to-publish-cloudservice

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!